lkml.org 
[lkml]   [2021]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH net-next v4] ipv6: add IFLA_INET6_RA_MTU to expose mtu value in the RA message
    From
    Date
    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.

    \
     
     \ /
      Last update: 2021-08-17 17:06    [W:3.493 / U:0.596 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site