diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:37:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:37:28 -0400 |
commit | d7e9660ad9d5e0845f52848bce31bcf5cdcdea6b (patch) | |
tree | c6c67d145771187b194d79d603742b31090a59d6 /net/ipv6/ndisc.c | |
parent | b8cb48aae1b8c50b37dcb7710363aa69a7a0d9ca (diff) | |
parent | 13af7a6ea502fcdd4c0e3d7de6e332b102309491 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
netxen: update copyright
netxen: fix tx timeout recovery
netxen: fix file firmware leak
netxen: improve pci memory access
netxen: change firmware write size
tg3: Fix return ring size breakage
netxen: build fix for INET=n
cdc-phonet: autoconfigure Phonet address
Phonet: back-end for autoconfigured addresses
Phonet: fix netlink address dump error handling
ipv6: Add IFA_F_DADFAILED flag
net: Add DEVTYPE support for Ethernet based devices
mv643xx_eth.c: remove unused txq_set_wrr()
ucc_geth: Fix hangs after switching from full to half duplex
ucc_geth: Rearrange some code to avoid forward declarations
phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
drivers/net/phy: introduce missing kfree
drivers/net/wan: introduce missing kfree
net: force bridge module(s) to be GPL
Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
...
Fixed up trivial conflicts:
- arch/x86/include/asm/socket.h
converted to <asm-generic/socket.h> in the x86 tree. The generic
header has the same new #define's, so that works out fine.
- drivers/net/tun.c
fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
switched over to using 'tun->socket.sk' instead of the redundantly
available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
to the TUN driver") which added a new 'tun->sk' use.
Noted in 'next' by Stephen Rothwell.
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 9eb68e92cc18..7015478797f6 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -98,7 +98,7 @@ static int pndisc_constructor(struct pneigh_entry *n); | |||
98 | static void pndisc_destructor(struct pneigh_entry *n); | 98 | static void pndisc_destructor(struct pneigh_entry *n); |
99 | static void pndisc_redo(struct sk_buff *skb); | 99 | static void pndisc_redo(struct sk_buff *skb); |
100 | 100 | ||
101 | static struct neigh_ops ndisc_generic_ops = { | 101 | static const struct neigh_ops ndisc_generic_ops = { |
102 | .family = AF_INET6, | 102 | .family = AF_INET6, |
103 | .solicit = ndisc_solicit, | 103 | .solicit = ndisc_solicit, |
104 | .error_report = ndisc_error_report, | 104 | .error_report = ndisc_error_report, |
@@ -108,7 +108,7 @@ static struct neigh_ops ndisc_generic_ops = { | |||
108 | .queue_xmit = dev_queue_xmit, | 108 | .queue_xmit = dev_queue_xmit, |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static struct neigh_ops ndisc_hh_ops = { | 111 | static const struct neigh_ops ndisc_hh_ops = { |
112 | .family = AF_INET6, | 112 | .family = AF_INET6, |
113 | .solicit = ndisc_solicit, | 113 | .solicit = ndisc_solicit, |
114 | .error_report = ndisc_error_report, | 114 | .error_report = ndisc_error_report, |
@@ -119,7 +119,7 @@ static struct neigh_ops ndisc_hh_ops = { | |||
119 | }; | 119 | }; |
120 | 120 | ||
121 | 121 | ||
122 | static struct neigh_ops ndisc_direct_ops = { | 122 | static const struct neigh_ops ndisc_direct_ops = { |
123 | .family = AF_INET6, | 123 | .family = AF_INET6, |
124 | .output = dev_queue_xmit, | 124 | .output = dev_queue_xmit, |
125 | .connected_output = dev_queue_xmit, | 125 | .connected_output = dev_queue_xmit, |
@@ -955,8 +955,8 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
955 | */ | 955 | */ |
956 | if (skb->pkt_type != PACKET_LOOPBACK) | 956 | if (skb->pkt_type != PACKET_LOOPBACK) |
957 | ND_PRINTK1(KERN_WARNING | 957 | ND_PRINTK1(KERN_WARNING |
958 | "ICMPv6 NA: someone advertises our address on %s!\n", | 958 | "ICMPv6 NA: someone advertises our address %pI6 on %s!\n", |
959 | ifp->idev->dev->name); | 959 | &ifp->addr, ifp->idev->dev->name); |
960 | in6_ifa_put(ifp); | 960 | in6_ifa_put(ifp); |
961 | return; | 961 | return; |
962 | } | 962 | } |
@@ -1151,10 +1151,6 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1151 | skb->dev->name); | 1151 | skb->dev->name); |
1152 | return; | 1152 | return; |
1153 | } | 1153 | } |
1154 | if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra) { | ||
1155 | in6_dev_put(in6_dev); | ||
1156 | return; | ||
1157 | } | ||
1158 | 1154 | ||
1159 | if (!ndisc_parse_options(opt, optlen, &ndopts)) { | 1155 | if (!ndisc_parse_options(opt, optlen, &ndopts)) { |
1160 | in6_dev_put(in6_dev); | 1156 | in6_dev_put(in6_dev); |
@@ -1163,6 +1159,10 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1163 | return; | 1159 | return; |
1164 | } | 1160 | } |
1165 | 1161 | ||
1162 | /* skip route and link configuration on routers */ | ||
1163 | if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra) | ||
1164 | goto skip_linkparms; | ||
1165 | |||
1166 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 1166 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
1167 | /* skip link-specific parameters from interior routers */ | 1167 | /* skip link-specific parameters from interior routers */ |
1168 | if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT) | 1168 | if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT) |
@@ -1283,9 +1283,7 @@ skip_defrtr: | |||
1283 | } | 1283 | } |
1284 | } | 1284 | } |
1285 | 1285 | ||
1286 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | ||
1287 | skip_linkparms: | 1286 | skip_linkparms: |
1288 | #endif | ||
1289 | 1287 | ||
1290 | /* | 1288 | /* |
1291 | * Process options. | 1289 | * Process options. |
@@ -1312,6 +1310,10 @@ skip_linkparms: | |||
1312 | NEIGH_UPDATE_F_ISROUTER); | 1310 | NEIGH_UPDATE_F_ISROUTER); |
1313 | } | 1311 | } |
1314 | 1312 | ||
1313 | /* skip route and link configuration on routers */ | ||
1314 | if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra) | ||
1315 | goto out; | ||
1316 | |||
1315 | #ifdef CONFIG_IPV6_ROUTE_INFO | 1317 | #ifdef CONFIG_IPV6_ROUTE_INFO |
1316 | if (in6_dev->cnf.accept_ra_rtr_pref && ndopts.nd_opts_ri) { | 1318 | if (in6_dev->cnf.accept_ra_rtr_pref && ndopts.nd_opts_ri) { |
1317 | struct nd_opt_hdr *p; | 1319 | struct nd_opt_hdr *p; |