Messages in this thread | | | Subject | Re: [PATCH net-next v4] ipv6: add IFLA_INET6_RA_MTU to expose mtu value in the RA message | From | David Ahern <> | Date | Tue, 17 Aug 2021 09:05:36 -0600 |
| |
On 8/17/21 1:26 AM, Rocco Yue wrote: > @@ -1496,6 +1490,11 @@ static void ndisc_router_discovery(struct sk_buff *skb) > memcpy(&n, ((u8 *)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu)); > mtu = ntohl(n); > > + if (in6_dev->ra_mtu != mtu) { > + in6_dev->ra_mtu = mtu; > + send_ifinfo_notify = true; > + } > + > if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) { > ND_PRINTK(2, warn, "RA: invalid mtu: %d\n", mtu); > } else if (in6_dev->cnf.mtu6 != mtu) {
If an RA no longer carries an MTU or if accept_ra_mtu is reset, then in6_dev->ra_mtu should be reset to 0 right?
rest of the change looks good to me.
| |