patch-2.2.11 linux/net/core/rtnetlink.c
Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/core/neighbour.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Mon Aug 9 12:04:41 1999
- Orig file:
v2.2.10/linux/net/core/rtnetlink.c
- Orig date:
Sun Mar 21 07:22:00 1999
diff -u --recursive --new-file v2.2.10/linux/net/core/rtnetlink.c linux/net/core/rtnetlink.c
@@ -14,6 +14,7 @@
*
* Fixes:
* Vitaly E. Lavrov RTA_OK arithmetics was wrong.
+ * Alexey Zhuravlev ifi_change does something useful
*/
#include <linux/config.h>
@@ -139,7 +140,7 @@
}
static int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct device *dev,
- int type, u32 pid, u32 seq)
+ int type, u32 pid, u32 seq, u32 change)
{
struct ifinfomsg *r;
struct nlmsghdr *nlh;
@@ -152,7 +153,7 @@
r->ifi_type = dev->type;
r->ifi_index = dev->ifindex;
r->ifi_flags = dev->flags;
- r->ifi_change = ~0U;
+ r->ifi_change = change;
RTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name);
if (dev->addr_len) {
@@ -192,7 +193,7 @@
for (dev=dev_base, idx=0; dev; dev = dev->next, idx++) {
if (idx < s_idx)
continue;
- if (rtnetlink_fill_ifinfo(skb, dev, RTM_NEWLINK, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq) <= 0)
+ if (rtnetlink_fill_ifinfo(skb, dev, RTM_NEWLINK, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 0) <= 0)
break;
}
cb->args[0] = idx;
@@ -235,7 +236,7 @@
if (!skb)
return;
- if (rtnetlink_fill_ifinfo(skb, dev, type, 0, 0) < 0) {
+ if (rtnetlink_fill_ifinfo(skb, dev, type, 0, 0, ~0U) < 0) {
kfree_skb(skb);
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)