aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_options.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_options.c')
-rw-r--r--net/ipv4/ip_options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index 2f14745a9e1f..4d315158fd3c 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -151,7 +151,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb)
151 __be32 addr; 151 __be32 addr;
152 152
153 memcpy(&addr, sptr+soffset-1, 4); 153 memcpy(&addr, sptr+soffset-1, 4);
154 if (inet_addr_type(addr) != RTN_LOCAL) { 154 if (inet_addr_type(&init_net, addr) != RTN_LOCAL) {
155 dopt->ts_needtime = 1; 155 dopt->ts_needtime = 1;
156 soffset += 8; 156 soffset += 8;
157 } 157 }
@@ -400,7 +400,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb)
400 { 400 {
401 __be32 addr; 401 __be32 addr;
402 memcpy(&addr, &optptr[optptr[2]-1], 4); 402 memcpy(&addr, &optptr[optptr[2]-1], 4);
403 if (inet_addr_type(addr) == RTN_UNICAST) 403 if (inet_addr_type(&init_net, addr) == RTN_UNICAST)
404 break; 404 break;
405 if (skb) 405 if (skb)
406 timeptr = (__be32*)&optptr[optptr[2]+3]; 406 timeptr = (__be32*)&optptr[optptr[2]+3];