* [PATCH] IPv6 Add more initializations of the new nl_info.nl_net field [not found] <20080221165149.928863399@theryb.frec.bull.fr> @ 2008-02-21 16:51 ` benjamin.thery 2008-02-24 4:02 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: benjamin.thery @ 2008-02-21 16:51 UTC (permalink / raw) To: David Miller; +Cc: Linux Netdev List, Benjamin Thery [-- Attachment #1: ipv6-initialize-new-nl_info.nl_net-field.patch --] [-- Type: text/plain, Size: 2306 bytes --] Add more missing initializations of the new nl_info.nl_net field in IPv6 stack. This field will be used when network namespaces are fully supported. Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> --- net/ipv6/addrconf.c | 9 +++++++++ net/ipv6/route.c | 6 ++++++ 2 files changed, 15 insertions(+) Index: net-2.6.26/net/ipv6/addrconf.c =================================================================== --- net-2.6.26.orig/net/ipv6/addrconf.c +++ net-2.6.26/net/ipv6/addrconf.c @@ -1557,6 +1557,9 @@ addrconf_prefix_route(struct in6_addr *p .fc_expires = expires, .fc_dst_len = plen, .fc_flags = RTF_UP | flags, + .fc_nlinfo.pid = 0, + .fc_nlinfo.nlh = NULL, + .fc_nlinfo.nl_net = &init_net, }; ipv6_addr_copy(&cfg.fc_dst, pfx); @@ -1583,6 +1586,9 @@ static void addrconf_add_mroute(struct n .fc_ifindex = dev->ifindex, .fc_dst_len = 8, .fc_flags = RTF_UP, + .fc_nlinfo.pid = 0, + .fc_nlinfo.nlh = NULL, + .fc_nlinfo.nl_net = &init_net, }; ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); @@ -1599,6 +1605,9 @@ static void sit_route_add(struct net_dev .fc_ifindex = dev->ifindex, .fc_dst_len = 96, .fc_flags = RTF_UP | RTF_NONEXTHOP, + .fc_nlinfo.pid = 0, + .fc_nlinfo.nlh = NULL, + .fc_nlinfo.nl_net = &init_net, }; /* prefix length - 96 bits "::d.d.d.d" */ Index: net-2.6.26/net/ipv6/route.c =================================================================== --- net-2.6.26.orig/net/ipv6/route.c +++ net-2.6.26/net/ipv6/route.c @@ -604,6 +604,8 @@ static int __ip6_ins_rt(struct rt6_info int ip6_ins_rt(struct rt6_info *rt) { struct nl_info info = { + .pid = 0, + .nlh = NULL, .nl_net = &init_net, }; return __ip6_ins_rt(rt, &info); @@ -1264,6 +1266,8 @@ static int __ip6_del_rt(struct rt6_info int ip6_del_rt(struct rt6_info *rt) { struct nl_info info = { + .pid = 0, + .nlh = NULL, .nl_net = &init_net, }; return __ip6_del_rt(rt, &info); @@ -1719,6 +1723,8 @@ static void rtmsg_to_fib6_config(struct cfg->fc_src_len = rtmsg->rtmsg_src_len; cfg->fc_flags = rtmsg->rtmsg_flags; + cfg->fc_nlinfo.nl_net = &init_net; + ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst); ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src); ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway); -- ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] IPv6 Add more initializations of the new nl_info.nl_net field 2008-02-21 16:51 ` [PATCH] IPv6 Add more initializations of the new nl_info.nl_net field benjamin.thery @ 2008-02-24 4:02 ` David Miller 2008-02-25 9:50 ` [PATCH] IPv6 - Add missing " Benjamin Thery 0 siblings, 1 reply; 4+ messages in thread From: David Miller @ 2008-02-24 4:02 UTC (permalink / raw) To: benjamin.thery; +Cc: netdev From: benjamin.thery@bull.net Date: Thu, 21 Feb 2008 17:51:50 +0100 > Add more missing initializations of the new nl_info.nl_net field in > IPv6 stack. > This field will be used when network namespaces are fully supported. > > Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Initializations to "zero" are not necessary nor usually done in these kinds of cases. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] IPv6 - Add missing initializations of the new nl_info.nl_net field 2008-02-24 4:02 ` David Miller @ 2008-02-25 9:50 ` Benjamin Thery 2008-02-27 2:10 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: Benjamin Thery @ 2008-02-25 9:50 UTC (permalink / raw) To: David Miller; +Cc: netdev Here is an updated version of the patch without the initializations to "zero". Add some more missing initializations of the new nl_info.nl_net field in IPv6 stack. This field will be used when network namespaces are fully supported. Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> --- net/ipv6/addrconf.c | 3 +++ net/ipv6/route.c | 2 ++ 2 files changed, 5 insertions(+) Index: net-2.6.26/net/ipv6/addrconf.c =================================================================== --- net-2.6.26.orig/net/ipv6/addrconf.c +++ net-2.6.26/net/ipv6/addrconf.c @@ -1557,6 +1557,7 @@ addrconf_prefix_route(struct in6_addr *p .fc_expires = expires, .fc_dst_len = plen, .fc_flags = RTF_UP | flags, + .fc_nlinfo.nl_net = &init_net, }; ipv6_addr_copy(&cfg.fc_dst, pfx); @@ -1583,6 +1584,7 @@ static void addrconf_add_mroute(struct n .fc_ifindex = dev->ifindex, .fc_dst_len = 8, .fc_flags = RTF_UP, + .fc_nlinfo.nl_net = &init_net, }; ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); @@ -1599,6 +1601,7 @@ static void sit_route_add(struct net_dev .fc_ifindex = dev->ifindex, .fc_dst_len = 96, .fc_flags = RTF_UP | RTF_NONEXTHOP, + .fc_nlinfo.nl_net = &init_net, }; /* prefix length - 96 bits "::d.d.d.d" */ Index: net-2.6.26/net/ipv6/route.c =================================================================== --- net-2.6.26.orig/net/ipv6/route.c +++ net-2.6.26/net/ipv6/route.c @@ -1719,6 +1719,8 @@ static void rtmsg_to_fib6_config(struct cfg->fc_src_len = rtmsg->rtmsg_src_len; cfg->fc_flags = rtmsg->rtmsg_flags; + cfg->fc_nlinfo.nl_net = &init_net; + ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst); ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src); ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway); -- ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] IPv6 - Add missing initializations of the new nl_info.nl_net field 2008-02-25 9:50 ` [PATCH] IPv6 - Add missing " Benjamin Thery @ 2008-02-27 2:10 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2008-02-27 2:10 UTC (permalink / raw) To: benjamin.thery; +Cc: netdev From: Benjamin Thery <benjamin.thery@bull.net> Date: Mon, 25 Feb 2008 10:50:23 +0100 > Here is an updated version of the patch without the initializations to > "zero". > > > Add some more missing initializations of the new nl_info.nl_net field in > IPv6 stack. This field will be used when network namespaces are fully > supported. > > Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Applied, thanks Benjamin. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-27 2:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080221165149.928863399@theryb.frec.bull.fr>
2008-02-21 16:51 ` [PATCH] IPv6 Add more initializations of the new nl_info.nl_net field benjamin.thery
2008-02-24 4:02 ` David Miller
2008-02-25 9:50 ` [PATCH] IPv6 - Add missing " Benjamin Thery
2008-02-27 2:10 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox