aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_input.c')
-rw-r--r--net/ipv4/ip_input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index f3a7a08a463f..eb1fa27dc0c4 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -160,6 +160,7 @@ int ip_call_ra_chain(struct sk_buff *skb)
160 struct ip_ra_chain *ra; 160 struct ip_ra_chain *ra;
161 u8 protocol = ip_hdr(skb)->protocol; 161 u8 protocol = ip_hdr(skb)->protocol;
162 struct sock *last = NULL; 162 struct sock *last = NULL;
163 struct net_device *dev = skb->dev;
163 164
164 read_lock(&ip_ra_lock); 165 read_lock(&ip_ra_lock);
165 for (ra = ip_ra_chain; ra; ra = ra->next) { 166 for (ra = ip_ra_chain; ra; ra = ra->next) {
@@ -170,7 +171,8 @@ int ip_call_ra_chain(struct sk_buff *skb)
170 */ 171 */
171 if (sk && inet_sk(sk)->num == protocol && 172 if (sk && inet_sk(sk)->num == protocol &&
172 (!sk->sk_bound_dev_if || 173 (!sk->sk_bound_dev_if ||
173 sk->sk_bound_dev_if == skb->dev->ifindex)) { 174 sk->sk_bound_dev_if == dev->ifindex) &&
175 sk->sk_net == dev->nd_net) {
174 if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) { 176 if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
175 if (ip_defrag(skb, IP_DEFRAG_CALL_RA_CHAIN)) { 177 if (ip_defrag(skb, IP_DEFRAG_CALL_RA_CHAIN)) {
176 read_unlock(&ip_ra_lock); 178 read_unlock(&ip_ra_lock);
@@ -286,7 +288,7 @@ static inline int ip_rcv_options(struct sk_buff *skb)
286 opt = &(IPCB(skb)->opt); 288 opt = &(IPCB(skb)->opt);
287 opt->optlen = iph->ihl*4 - sizeof(struct iphdr); 289 opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
288 290
289 if (ip_options_compile(&init_net, opt, skb)) { 291 if (ip_options_compile(dev->nd_net, opt, skb)) {
290 IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); 292 IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
291 goto drop; 293 goto drop;
292 } 294 }