diff options
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 7f03373b8c07..566ea6c4321d 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -116,7 +116,6 @@ | |||
116 | #include <linux/mroute.h> | 116 | #include <linux/mroute.h> |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | extern void ip_mc_drop_socket(struct sock *sk); | ||
120 | 119 | ||
121 | /* The inetsw table contains everything that inet_create needs to | 120 | /* The inetsw table contains everything that inet_create needs to |
122 | * build a new socket. | 121 | * build a new socket. |
@@ -375,6 +374,7 @@ lookup_protocol: | |||
375 | inet->uc_ttl = -1; | 374 | inet->uc_ttl = -1; |
376 | inet->mc_loop = 1; | 375 | inet->mc_loop = 1; |
377 | inet->mc_ttl = 1; | 376 | inet->mc_ttl = 1; |
377 | inet->mc_all = 1; | ||
378 | inet->mc_index = 0; | 378 | inet->mc_index = 0; |
379 | inet->mc_list = NULL; | 379 | inet->mc_list = NULL; |
380 | 380 | ||
@@ -1003,8 +1003,6 @@ void inet_register_protosw(struct inet_protosw *p) | |||
1003 | out: | 1003 | out: |
1004 | spin_unlock_bh(&inetsw_lock); | 1004 | spin_unlock_bh(&inetsw_lock); |
1005 | 1005 | ||
1006 | synchronize_net(); | ||
1007 | |||
1008 | return; | 1006 | return; |
1009 | 1007 | ||
1010 | out_permanent: | 1008 | out_permanent: |
@@ -1248,13 +1246,20 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head, | |||
1248 | struct sk_buff **pp = NULL; | 1246 | struct sk_buff **pp = NULL; |
1249 | struct sk_buff *p; | 1247 | struct sk_buff *p; |
1250 | struct iphdr *iph; | 1248 | struct iphdr *iph; |
1249 | unsigned int hlen; | ||
1250 | unsigned int off; | ||
1251 | unsigned int id; | ||
1251 | int flush = 1; | 1252 | int flush = 1; |
1252 | int proto; | 1253 | int proto; |
1253 | int id; | ||
1254 | 1254 | ||
1255 | iph = skb_gro_header(skb, sizeof(*iph)); | 1255 | off = skb_gro_offset(skb); |
1256 | if (unlikely(!iph)) | 1256 | hlen = off + sizeof(*iph); |
1257 | goto out; | 1257 | iph = skb_gro_header_fast(skb, off); |
1258 | if (skb_gro_header_hard(skb, hlen)) { | ||
1259 | iph = skb_gro_header_slow(skb, hlen, off); | ||
1260 | if (unlikely(!iph)) | ||
1261 | goto out; | ||
1262 | } | ||
1258 | 1263 | ||
1259 | proto = iph->protocol & (MAX_INET_PROTOS - 1); | 1264 | proto = iph->protocol & (MAX_INET_PROTOS - 1); |
1260 | 1265 | ||
@@ -1269,9 +1274,9 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head, | |||
1269 | if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) | 1274 | if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) |
1270 | goto out_unlock; | 1275 | goto out_unlock; |
1271 | 1276 | ||
1272 | flush = ntohs(iph->tot_len) != skb_gro_len(skb) || | 1277 | id = ntohl(*(u32 *)&iph->id); |
1273 | iph->frag_off != htons(IP_DF); | 1278 | flush = (u16)((ntohl(*(u32 *)iph) ^ skb_gro_len(skb)) | (id ^ IP_DF)); |
1274 | id = ntohs(iph->id); | 1279 | id >>= 16; |
1275 | 1280 | ||
1276 | for (p = *head; p; p = p->next) { | 1281 | for (p = *head; p; p = p->next) { |
1277 | struct iphdr *iph2; | 1282 | struct iphdr *iph2; |