diff options
-rw-r--r-- | net/ipv4/inet_lro.c | 36 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 6 | ||||
-rw-r--r-- | net/ipv4/ipconfig.c | 13 | ||||
-rw-r--r-- | net/ipv4/route.c | 19 | ||||
-rw-r--r-- | net/ipv4/tcp_htcp.c | 10 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_lp.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_probe.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_veno.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp_yeah.c | 4 | ||||
-rw-r--r-- | net/ipv4/udp.c | 36 |
12 files changed, 73 insertions, 72 deletions
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c index 6a667dae315e..47038cb6c138 100644 --- a/net/ipv4/inet_lro.c +++ b/net/ipv4/inet_lro.c | |||
@@ -64,15 +64,15 @@ static int lro_tcp_ip_check(struct iphdr *iph, struct tcphdr *tcph, | |||
64 | if (iph->ihl != IPH_LEN_WO_OPTIONS) | 64 | if (iph->ihl != IPH_LEN_WO_OPTIONS) |
65 | return -1; | 65 | return -1; |
66 | 66 | ||
67 | if (tcph->cwr || tcph->ece || tcph->urg || !tcph->ack | 67 | if (tcph->cwr || tcph->ece || tcph->urg || !tcph->ack || |
68 | || tcph->rst || tcph->syn || tcph->fin) | 68 | tcph->rst || tcph->syn || tcph->fin) |
69 | return -1; | 69 | return -1; |
70 | 70 | ||
71 | if (INET_ECN_is_ce(ipv4_get_dsfield(iph))) | 71 | if (INET_ECN_is_ce(ipv4_get_dsfield(iph))) |
72 | return -1; | 72 | return -1; |
73 | 73 | ||
74 | if (tcph->doff != TCPH_LEN_WO_OPTIONS | 74 | if (tcph->doff != TCPH_LEN_WO_OPTIONS && |
75 | && tcph->doff != TCPH_LEN_W_TIMESTAMP) | 75 | tcph->doff != TCPH_LEN_W_TIMESTAMP) |
76 | return -1; | 76 | return -1; |
77 | 77 | ||
78 | /* check tcp options (only timestamp allowed) */ | 78 | /* check tcp options (only timestamp allowed) */ |
@@ -262,10 +262,10 @@ static int lro_check_tcp_conn(struct net_lro_desc *lro_desc, | |||
262 | struct iphdr *iph, | 262 | struct iphdr *iph, |
263 | struct tcphdr *tcph) | 263 | struct tcphdr *tcph) |
264 | { | 264 | { |
265 | if ((lro_desc->iph->saddr != iph->saddr) | 265 | if ((lro_desc->iph->saddr != iph->saddr) || |
266 | || (lro_desc->iph->daddr != iph->daddr) | 266 | (lro_desc->iph->daddr != iph->daddr) || |
267 | || (lro_desc->tcph->source != tcph->source) | 267 | (lro_desc->tcph->source != tcph->source) || |
268 | || (lro_desc->tcph->dest != tcph->dest)) | 268 | (lro_desc->tcph->dest != tcph->dest)) |
269 | return -1; | 269 | return -1; |
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
@@ -339,9 +339,9 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, | |||
339 | u64 flags; | 339 | u64 flags; |
340 | int vlan_hdr_len = 0; | 340 | int vlan_hdr_len = 0; |
341 | 341 | ||
342 | if (!lro_mgr->get_skb_header | 342 | if (!lro_mgr->get_skb_header || |
343 | || lro_mgr->get_skb_header(skb, (void *)&iph, (void *)&tcph, | 343 | lro_mgr->get_skb_header(skb, (void *)&iph, (void *)&tcph, |
344 | &flags, priv)) | 344 | &flags, priv)) |
345 | goto out; | 345 | goto out; |
346 | 346 | ||
347 | if (!(flags & LRO_IPV4) || !(flags & LRO_TCP)) | 347 | if (!(flags & LRO_IPV4) || !(flags & LRO_TCP)) |
@@ -351,8 +351,8 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, | |||
351 | if (!lro_desc) | 351 | if (!lro_desc) |
352 | goto out; | 352 | goto out; |
353 | 353 | ||
354 | if ((skb->protocol == htons(ETH_P_8021Q)) | 354 | if ((skb->protocol == htons(ETH_P_8021Q)) && |
355 | && !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) | 355 | !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) |
356 | vlan_hdr_len = VLAN_HLEN; | 356 | vlan_hdr_len = VLAN_HLEN; |
357 | 357 | ||
358 | if (!lro_desc->active) { /* start new lro session */ | 358 | if (!lro_desc->active) { /* start new lro session */ |
@@ -446,9 +446,9 @@ static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, | |||
446 | int hdr_len = LRO_MAX_PG_HLEN; | 446 | int hdr_len = LRO_MAX_PG_HLEN; |
447 | int vlan_hdr_len = 0; | 447 | int vlan_hdr_len = 0; |
448 | 448 | ||
449 | if (!lro_mgr->get_frag_header | 449 | if (!lro_mgr->get_frag_header || |
450 | || lro_mgr->get_frag_header(frags, (void *)&mac_hdr, (void *)&iph, | 450 | lro_mgr->get_frag_header(frags, (void *)&mac_hdr, (void *)&iph, |
451 | (void *)&tcph, &flags, priv)) { | 451 | (void *)&tcph, &flags, priv)) { |
452 | mac_hdr = page_address(frags->page) + frags->page_offset; | 452 | mac_hdr = page_address(frags->page) + frags->page_offset; |
453 | goto out1; | 453 | goto out1; |
454 | } | 454 | } |
@@ -472,8 +472,8 @@ static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, | |||
472 | if (!skb) | 472 | if (!skb) |
473 | goto out; | 473 | goto out; |
474 | 474 | ||
475 | if ((skb->protocol == htons(ETH_P_8021Q)) | 475 | if ((skb->protocol == htons(ETH_P_8021Q)) && |
476 | && !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) | 476 | !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) |
477 | vlan_hdr_len = VLAN_HLEN; | 477 | vlan_hdr_len = VLAN_HLEN; |
478 | 478 | ||
479 | iph = (void *)(skb->data + vlan_hdr_len); | 479 | iph = (void *)(skb->data + vlan_hdr_len); |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 322b40864ac0..b78e61502efe 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -264,9 +264,11 @@ int ip_mc_output(struct sk_buff *skb) | |||
264 | 264 | ||
265 | This check is duplicated in ip_mr_input at the moment. | 265 | This check is duplicated in ip_mr_input at the moment. |
266 | */ | 266 | */ |
267 | && ((rt->rt_flags&RTCF_LOCAL) || !(IPCB(skb)->flags&IPSKB_FORWARDED)) | 267 | && |
268 | ((rt->rt_flags & RTCF_LOCAL) || | ||
269 | !(IPCB(skb)->flags & IPSKB_FORWARDED)) | ||
268 | #endif | 270 | #endif |
269 | ) { | 271 | ) { |
270 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); | 272 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); |
271 | if (newskb) | 273 | if (newskb) |
272 | NF_HOOK(PF_INET, NF_INET_POST_ROUTING, newskb, | 274 | NF_HOOK(PF_INET, NF_INET_POST_ROUTING, newskb, |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index f8d04c256454..4e08b7f2331c 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -1172,10 +1172,9 @@ static int __init ic_dynamic(void) | |||
1172 | schedule_timeout_uninterruptible(1); | 1172 | schedule_timeout_uninterruptible(1); |
1173 | #ifdef IPCONFIG_DHCP | 1173 | #ifdef IPCONFIG_DHCP |
1174 | /* DHCP isn't done until we get a DHCPACK. */ | 1174 | /* DHCP isn't done until we get a DHCPACK. */ |
1175 | if ((ic_got_reply & IC_BOOTP) | 1175 | if ((ic_got_reply & IC_BOOTP) && |
1176 | && (ic_proto_enabled & IC_USE_DHCP) | 1176 | (ic_proto_enabled & IC_USE_DHCP) && |
1177 | && ic_dhcp_msgtype != DHCPACK) | 1177 | ic_dhcp_msgtype != DHCPACK) { |
1178 | { | ||
1179 | ic_got_reply = 0; | 1178 | ic_got_reply = 0; |
1180 | printk(","); | 1179 | printk(","); |
1181 | continue; | 1180 | continue; |
@@ -1344,9 +1343,9 @@ static int __init ip_auto_config(void) | |||
1344 | */ | 1343 | */ |
1345 | if (ic_myaddr == NONE || | 1344 | if (ic_myaddr == NONE || |
1346 | #ifdef CONFIG_ROOT_NFS | 1345 | #ifdef CONFIG_ROOT_NFS |
1347 | (root_server_addr == NONE | 1346 | (root_server_addr == NONE && |
1348 | && ic_servaddr == NONE | 1347 | ic_servaddr == NONE && |
1349 | && ROOT_DEV == Root_NFS) || | 1348 | ROOT_DEV == Root_NFS) || |
1350 | #endif | 1349 | #endif |
1351 | ic_first_dev->next) { | 1350 | ic_first_dev->next) { |
1352 | #ifdef IPCONFIG_DYNAMIC | 1351 | #ifdef IPCONFIG_DYNAMIC |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 4284ceef7945..7547944ea9bf 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1346,9 +1346,9 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw, | |||
1346 | return; | 1346 | return; |
1347 | 1347 | ||
1348 | net = dev_net(dev); | 1348 | net = dev_net(dev); |
1349 | if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) | 1349 | if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) || |
1350 | || ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw) | 1350 | ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw) || |
1351 | || ipv4_is_zeronet(new_gw)) | 1351 | ipv4_is_zeronet(new_gw)) |
1352 | goto reject_redirect; | 1352 | goto reject_redirect; |
1353 | 1353 | ||
1354 | if (!rt_caching(net)) | 1354 | if (!rt_caching(net)) |
@@ -2311,10 +2311,11 @@ skip_cache: | |||
2311 | ip_hdr(skb)->protocol); | 2311 | ip_hdr(skb)->protocol); |
2312 | if (our | 2312 | if (our |
2313 | #ifdef CONFIG_IP_MROUTE | 2313 | #ifdef CONFIG_IP_MROUTE |
2314 | || (!ipv4_is_local_multicast(daddr) && | 2314 | || |
2315 | IN_DEV_MFORWARD(in_dev)) | 2315 | (!ipv4_is_local_multicast(daddr) && |
2316 | IN_DEV_MFORWARD(in_dev)) | ||
2316 | #endif | 2317 | #endif |
2317 | ) { | 2318 | ) { |
2318 | rcu_read_unlock(); | 2319 | rcu_read_unlock(); |
2319 | return ip_route_input_mc(skb, daddr, saddr, | 2320 | return ip_route_input_mc(skb, daddr, saddr, |
2320 | tos, dev, our); | 2321 | tos, dev, our); |
@@ -2511,9 +2512,9 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, | |||
2511 | of another iface. --ANK | 2512 | of another iface. --ANK |
2512 | */ | 2513 | */ |
2513 | 2514 | ||
2514 | if (oldflp->oif == 0 | 2515 | if (oldflp->oif == 0 && |
2515 | && (ipv4_is_multicast(oldflp->fl4_dst) || | 2516 | (ipv4_is_multicast(oldflp->fl4_dst) || |
2516 | oldflp->fl4_dst == htonl(0xFFFFFFFF))) { | 2517 | oldflp->fl4_dst == htonl(0xFFFFFFFF))) { |
2517 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ | 2518 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ |
2518 | dev_out = ip_dev_find(net, oldflp->fl4_src); | 2519 | dev_out = ip_dev_find(net, oldflp->fl4_src); |
2519 | if (dev_out == NULL) | 2520 | if (dev_out == NULL) |
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index 26d5c7fc7de5..7c94a4955416 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c | |||
@@ -92,8 +92,8 @@ static inline void measure_rtt(struct sock *sk, u32 srtt) | |||
92 | if (icsk->icsk_ca_state == TCP_CA_Open) { | 92 | if (icsk->icsk_ca_state == TCP_CA_Open) { |
93 | if (ca->maxRTT < ca->minRTT) | 93 | if (ca->maxRTT < ca->minRTT) |
94 | ca->maxRTT = ca->minRTT; | 94 | ca->maxRTT = ca->minRTT; |
95 | if (ca->maxRTT < srtt | 95 | if (ca->maxRTT < srtt && |
96 | && srtt <= ca->maxRTT + msecs_to_jiffies(20)) | 96 | srtt <= ca->maxRTT + msecs_to_jiffies(20)) |
97 | ca->maxRTT = srtt; | 97 | ca->maxRTT = srtt; |
98 | } | 98 | } |
99 | } | 99 | } |
@@ -123,9 +123,9 @@ static void measure_achieved_throughput(struct sock *sk, u32 pkts_acked, s32 rtt | |||
123 | 123 | ||
124 | ca->packetcount += pkts_acked; | 124 | ca->packetcount += pkts_acked; |
125 | 125 | ||
126 | if (ca->packetcount >= tp->snd_cwnd - (ca->alpha >> 7 ? : 1) | 126 | if (ca->packetcount >= tp->snd_cwnd - (ca->alpha >> 7 ? : 1) && |
127 | && now - ca->lasttime >= ca->minRTT | 127 | now - ca->lasttime >= ca->minRTT && |
128 | && ca->minRTT > 0) { | 128 | ca->minRTT > 0) { |
129 | __u32 cur_Bi = ca->packetcount * HZ / (now - ca->lasttime); | 129 | __u32 cur_Bi = ca->packetcount * HZ / (now - ca->lasttime); |
130 | 130 | ||
131 | if (htcp_ccount(ca) <= 3) { | 131 | if (htcp_ccount(ca) <= 3) { |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index cc306ac6eb51..be166e0e11c5 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4852,11 +4852,11 @@ static void __tcp_ack_snd_check(struct sock *sk, int ofo_possible) | |||
4852 | struct tcp_sock *tp = tcp_sk(sk); | 4852 | struct tcp_sock *tp = tcp_sk(sk); |
4853 | 4853 | ||
4854 | /* More than one full frame received... */ | 4854 | /* More than one full frame received... */ |
4855 | if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss | 4855 | if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss && |
4856 | /* ... and right edge of window advances far enough. | 4856 | /* ... and right edge of window advances far enough. |
4857 | * (tcp_recvmsg() will send ACK otherwise). Or... | 4857 | * (tcp_recvmsg() will send ACK otherwise). Or... |
4858 | */ | 4858 | */ |
4859 | && __tcp_select_window(sk) >= tp->rcv_wnd) || | 4859 | __tcp_select_window(sk) >= tp->rcv_wnd) || |
4860 | /* We ACK each frame or... */ | 4860 | /* We ACK each frame or... */ |
4861 | tcp_in_quickack_mode(sk) || | 4861 | tcp_in_quickack_mode(sk) || |
4862 | /* We have out of order data. */ | 4862 | /* We have out of order data. */ |
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index ce3c41ff50b2..de870377fbba 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c | |||
@@ -143,8 +143,8 @@ static u32 tcp_lp_remote_hz_estimator(struct sock *sk) | |||
143 | goto out; | 143 | goto out; |
144 | 144 | ||
145 | /* we can't calc remote HZ with no different!! */ | 145 | /* we can't calc remote HZ with no different!! */ |
146 | if (tp->rx_opt.rcv_tsval == lp->remote_ref_time | 146 | if (tp->rx_opt.rcv_tsval == lp->remote_ref_time || |
147 | || tp->rx_opt.rcv_tsecr == lp->local_ref_time) | 147 | tp->rx_opt.rcv_tsecr == lp->local_ref_time) |
148 | goto out; | 148 | goto out; |
149 | 149 | ||
150 | m = HZ * (tp->rx_opt.rcv_tsval - | 150 | m = HZ * (tp->rx_opt.rcv_tsval - |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 616c686ca253..875bc6dcd920 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1923,8 +1923,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1923 | * case, when window is shrunk to zero. In this case | 1923 | * case, when window is shrunk to zero. In this case |
1924 | * our retransmit serves as a zero window probe. | 1924 | * our retransmit serves as a zero window probe. |
1925 | */ | 1925 | */ |
1926 | if (!before(TCP_SKB_CB(skb)->seq, tcp_wnd_end(tp)) | 1926 | if (!before(TCP_SKB_CB(skb)->seq, tcp_wnd_end(tp)) && |
1927 | && TCP_SKB_CB(skb)->seq != tp->snd_una) | 1927 | TCP_SKB_CB(skb)->seq != tp->snd_una) |
1928 | return -EAGAIN; | 1928 | return -EAGAIN; |
1929 | 1929 | ||
1930 | if (skb->len > cur_mss) { | 1930 | if (skb->len > cur_mss) { |
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 7a3cc2ffad84..bb110c5ce1d2 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -95,8 +95,8 @@ static int jtcp_rcv_established(struct sock *sk, struct sk_buff *skb, | |||
95 | 95 | ||
96 | /* Only update if port matches */ | 96 | /* Only update if port matches */ |
97 | if ((port == 0 || ntohs(inet->inet_dport) == port || | 97 | if ((port == 0 || ntohs(inet->inet_dport) == port || |
98 | ntohs(inet->inet_sport) == port) | 98 | ntohs(inet->inet_sport) == port) && |
99 | && (full || tp->snd_cwnd != tcp_probe.lastcwnd)) { | 99 | (full || tp->snd_cwnd != tcp_probe.lastcwnd)) { |
100 | 100 | ||
101 | spin_lock(&tcp_probe.lock); | 101 | spin_lock(&tcp_probe.lock); |
102 | /* If log fills, just silently drop */ | 102 | /* If log fills, just silently drop */ |
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c index e9bbff746488..b612acf76183 100644 --- a/net/ipv4/tcp_veno.c +++ b/net/ipv4/tcp_veno.c | |||
@@ -165,9 +165,8 @@ static void tcp_veno_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
165 | * every other rtt. | 165 | * every other rtt. |
166 | */ | 166 | */ |
167 | if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { | 167 | if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { |
168 | if (veno->inc | 168 | if (veno->inc && |
169 | && tp->snd_cwnd < | 169 | tp->snd_cwnd < tp->snd_cwnd_clamp) { |
170 | tp->snd_cwnd_clamp) { | ||
171 | tp->snd_cwnd++; | 170 | tp->snd_cwnd++; |
172 | veno->inc = 0; | 171 | veno->inc = 0; |
173 | } else | 172 | } else |
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index 66b6821b984e..a0f240358892 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c | |||
@@ -157,8 +157,8 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
157 | 157 | ||
158 | if (queue > TCP_YEAH_ALPHA || | 158 | if (queue > TCP_YEAH_ALPHA || |
159 | rtt - yeah->vegas.baseRTT > (yeah->vegas.baseRTT / TCP_YEAH_PHY)) { | 159 | rtt - yeah->vegas.baseRTT > (yeah->vegas.baseRTT / TCP_YEAH_PHY)) { |
160 | if (queue > TCP_YEAH_ALPHA | 160 | if (queue > TCP_YEAH_ALPHA && |
161 | && tp->snd_cwnd > yeah->reno_count) { | 161 | tp->snd_cwnd > yeah->reno_count) { |
162 | u32 reduction = min(queue / TCP_YEAH_GAMMA , | 162 | u32 reduction = min(queue / TCP_YEAH_GAMMA , |
163 | tp->snd_cwnd >> TCP_YEAH_EPSILON); | 163 | tp->snd_cwnd >> TCP_YEAH_EPSILON); |
164 | 164 | ||
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 1eaf57567ebf..1f9534846ca9 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -136,12 +136,12 @@ static int udp_lib_lport_inuse(struct net *net, __u16 num, | |||
136 | struct hlist_nulls_node *node; | 136 | struct hlist_nulls_node *node; |
137 | 137 | ||
138 | sk_nulls_for_each(sk2, node, &hslot->head) | 138 | sk_nulls_for_each(sk2, node, &hslot->head) |
139 | if (net_eq(sock_net(sk2), net) && | 139 | if (net_eq(sock_net(sk2), net) && |
140 | sk2 != sk && | 140 | sk2 != sk && |
141 | (bitmap || udp_sk(sk2)->udp_port_hash == num) && | 141 | (bitmap || udp_sk(sk2)->udp_port_hash == num) && |
142 | (!sk2->sk_reuse || !sk->sk_reuse) && | 142 | (!sk2->sk_reuse || !sk->sk_reuse) && |
143 | (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if | 143 | (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if || |
144 | || sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && | 144 | sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && |
145 | (*saddr_comp)(sk, sk2)) { | 145 | (*saddr_comp)(sk, sk2)) { |
146 | if (bitmap) | 146 | if (bitmap) |
147 | __set_bit(udp_sk(sk2)->udp_port_hash >> log, | 147 | __set_bit(udp_sk(sk2)->udp_port_hash >> log, |
@@ -168,12 +168,12 @@ static int udp_lib_lport_inuse2(struct net *net, __u16 num, | |||
168 | 168 | ||
169 | spin_lock(&hslot2->lock); | 169 | spin_lock(&hslot2->lock); |
170 | udp_portaddr_for_each_entry(sk2, node, &hslot2->head) | 170 | udp_portaddr_for_each_entry(sk2, node, &hslot2->head) |
171 | if (net_eq(sock_net(sk2), net) && | 171 | if (net_eq(sock_net(sk2), net) && |
172 | sk2 != sk && | 172 | sk2 != sk && |
173 | (udp_sk(sk2)->udp_port_hash == num) && | 173 | (udp_sk(sk2)->udp_port_hash == num) && |
174 | (!sk2->sk_reuse || !sk->sk_reuse) && | 174 | (!sk2->sk_reuse || !sk->sk_reuse) && |
175 | (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if | 175 | (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if || |
176 | || sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && | 176 | sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && |
177 | (*saddr_comp)(sk, sk2)) { | 177 | (*saddr_comp)(sk, sk2)) { |
178 | res = 1; | 178 | res = 1; |
179 | break; | 179 | break; |
@@ -545,13 +545,13 @@ static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk, | |||
545 | sk_nulls_for_each_from(s, node) { | 545 | sk_nulls_for_each_from(s, node) { |
546 | struct inet_sock *inet = inet_sk(s); | 546 | struct inet_sock *inet = inet_sk(s); |
547 | 547 | ||
548 | if (!net_eq(sock_net(s), net) || | 548 | if (!net_eq(sock_net(s), net) || |
549 | udp_sk(s)->udp_port_hash != hnum || | 549 | udp_sk(s)->udp_port_hash != hnum || |
550 | (inet->inet_daddr && inet->inet_daddr != rmt_addr) || | 550 | (inet->inet_daddr && inet->inet_daddr != rmt_addr) || |
551 | (inet->inet_dport != rmt_port && inet->inet_dport) || | 551 | (inet->inet_dport != rmt_port && inet->inet_dport) || |
552 | (inet->inet_rcv_saddr && | 552 | (inet->inet_rcv_saddr && |
553 | inet->inet_rcv_saddr != loc_addr) || | 553 | inet->inet_rcv_saddr != loc_addr) || |
554 | ipv6_only_sock(s) || | 554 | ipv6_only_sock(s) || |
555 | (s->sk_bound_dev_if && s->sk_bound_dev_if != dif)) | 555 | (s->sk_bound_dev_if && s->sk_bound_dev_if != dif)) |
556 | continue; | 556 | continue; |
557 | if (!ip_mc_sf_allow(s, loc_addr, rmt_addr, dif)) | 557 | if (!ip_mc_sf_allow(s, loc_addr, rmt_addr, dif)) |