Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dbb2ed24851a290616d66212dc75373fd863d636
Commit:     dbb2ed24851a290616d66212dc75373fd863d636
Parent:     325d22df7b19e0116aff3391d3a03f73d0634ded
Author:     Pierre Ynard <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 12 17:58:35 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Nov 12 17:58:35 2007 -0800

    [IPV6]: Add ifindex field to ND user option messages.
    
    Userland neighbor discovery options are typically heavily involved with
    the interface on which thay are received: add a missing ifindex field to
    the original struct. Thanks to R�mi Denis-Courmont.
    
    Signed-off-by: Pierre Ynard <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/linux/rtnetlink.h |    2 ++
 net/ipv6/ndisc.c          |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 5bf6182..4e81836 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -491,9 +491,11 @@ struct nduseroptmsg
        unsigned char   nduseropt_family;
        unsigned char   nduseropt_pad1;
        unsigned short  nduseropt_opts_len;     /* Total length of options */
+       int             nduseropt_ifindex;
        __u8            nduseropt_icmp_type;
        __u8            nduseropt_icmp_code;
        unsigned short  nduseropt_pad2;
+       unsigned int    nduseropt_pad3;
        /* Followed by one or more ND options */
 };
 
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 36f7dbf..67997a7 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1037,6 +1037,7 @@ static void ndisc_ra_useropt(struct sk_buff *ra, struct 
nd_opt_hdr *opt)
 
        ndmsg = nlmsg_data(nlh);
        ndmsg->nduseropt_family = AF_INET6;
+       ndmsg->nduseropt_ifindex = ra->dev->ifindex;
        ndmsg->nduseropt_icmp_type = icmp6h->icmp6_type;
        ndmsg->nduseropt_icmp_code = icmp6h->icmp6_code;
        ndmsg->nduseropt_opts_len = opt->nd_opt_len << 3;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to