ipv6: send only one NEWLINK when RA causes changes
Signed-off-by: Marius Tomaschewski <mt@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c42858eaf4
commit
2053aeb69a
1 changed files with 10 additions and 3 deletions
|
@ -1079,6 +1079,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
||||||
int optlen;
|
int optlen;
|
||||||
unsigned int pref = 0;
|
unsigned int pref = 0;
|
||||||
__u32 old_if_flags;
|
__u32 old_if_flags;
|
||||||
|
bool send_ifinfo_notify = false;
|
||||||
|
|
||||||
__u8 *opt = (__u8 *)(ra_msg + 1);
|
__u8 *opt = (__u8 *)(ra_msg + 1);
|
||||||
|
|
||||||
|
@ -1158,7 +1159,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
||||||
IF_RA_OTHERCONF : 0);
|
IF_RA_OTHERCONF : 0);
|
||||||
|
|
||||||
if (old_if_flags != in6_dev->if_flags)
|
if (old_if_flags != in6_dev->if_flags)
|
||||||
inet6_ifinfo_notify(RTM_NEWLINK, in6_dev);
|
send_ifinfo_notify = true;
|
||||||
|
|
||||||
if (!in6_dev->cnf.accept_ra_defrtr) {
|
if (!in6_dev->cnf.accept_ra_defrtr) {
|
||||||
ND_PRINTK(2, info,
|
ND_PRINTK(2, info,
|
||||||
|
@ -1261,7 +1262,7 @@ skip_defrtr:
|
||||||
rtime = HZ/10;
|
rtime = HZ/10;
|
||||||
NEIGH_VAR_SET(in6_dev->nd_parms, RETRANS_TIME, rtime);
|
NEIGH_VAR_SET(in6_dev->nd_parms, RETRANS_TIME, rtime);
|
||||||
in6_dev->tstamp = jiffies;
|
in6_dev->tstamp = jiffies;
|
||||||
inet6_ifinfo_notify(RTM_NEWLINK, in6_dev);
|
send_ifinfo_notify = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtime = ntohl(ra_msg->reachable_time);
|
rtime = ntohl(ra_msg->reachable_time);
|
||||||
|
@ -1278,11 +1279,17 @@ skip_defrtr:
|
||||||
GC_STALETIME, 3 * rtime);
|
GC_STALETIME, 3 * rtime);
|
||||||
in6_dev->nd_parms->reachable_time = neigh_rand_reach_time(rtime);
|
in6_dev->nd_parms->reachable_time = neigh_rand_reach_time(rtime);
|
||||||
in6_dev->tstamp = jiffies;
|
in6_dev->tstamp = jiffies;
|
||||||
inet6_ifinfo_notify(RTM_NEWLINK, in6_dev);
|
send_ifinfo_notify = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Send a notify if RA changed managed/otherconf flags or timer settings
|
||||||
|
*/
|
||||||
|
if (send_ifinfo_notify)
|
||||||
|
inet6_ifinfo_notify(RTM_NEWLINK, in6_dev);
|
||||||
|
|
||||||
skip_linkparms:
|
skip_linkparms:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue