Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: Documentation/networking/ip-sysctl.txt drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Both conflicts were simply overlapping context. A build fix for qlcnic is in here too, simply removing the added devinit annotations which no longer exist. Signed-off-by: David S. Miller <davem@davemloft.net>
Šī revīzija ir iekļauta:
@@ -823,9 +823,9 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
|
||||
if (!ifa) {
|
||||
ret = -ENOBUFS;
|
||||
ifa = inet_alloc_ifa();
|
||||
INIT_HLIST_NODE(&ifa->hash);
|
||||
if (!ifa)
|
||||
break;
|
||||
INIT_HLIST_NODE(&ifa->hash);
|
||||
if (colon)
|
||||
memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
|
||||
else
|
||||
|
@@ -590,7 +590,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
|
||||
case IP_TTL:
|
||||
if (optlen < 1)
|
||||
goto e_inval;
|
||||
if (val != -1 && (val < 0 || val > 255))
|
||||
if (val != -1 && (val < 1 || val > 255))
|
||||
goto e_inval;
|
||||
inet->uc_ttl = val;
|
||||
break;
|
||||
|
@@ -136,6 +136,8 @@ __be32 ic_myaddr = NONE; /* My IP address */
|
||||
static __be32 ic_netmask = NONE; /* Netmask for local subnet */
|
||||
__be32 ic_gateway = NONE; /* Gateway IP address */
|
||||
|
||||
__be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
|
||||
|
||||
__be32 ic_servaddr = NONE; /* Boot server IP address */
|
||||
|
||||
__be32 root_server_addr = NONE; /* Address of NFS server */
|
||||
@@ -558,6 +560,7 @@ ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
|
||||
if (ic_myaddr == NONE)
|
||||
ic_myaddr = tip;
|
||||
ic_servaddr = sip;
|
||||
ic_addrservaddr = sip;
|
||||
ic_got_reply = IC_RARP;
|
||||
|
||||
drop_unlock:
|
||||
@@ -1068,7 +1071,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
|
||||
ic_servaddr = server_id;
|
||||
#ifdef IPCONFIG_DEBUG
|
||||
printk("DHCP: Offered address %pI4 by server %pI4\n",
|
||||
&ic_myaddr, &ic_servaddr);
|
||||
&ic_myaddr, &b->iph.saddr);
|
||||
#endif
|
||||
/* The DHCP indicated server address takes
|
||||
* precedence over the bootp header one if
|
||||
@@ -1113,6 +1116,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
|
||||
ic_dev = dev;
|
||||
ic_myaddr = b->your_ip;
|
||||
ic_servaddr = b->server_ip;
|
||||
ic_addrservaddr = b->iph.saddr;
|
||||
if (ic_gateway == NONE && b->relay_ip)
|
||||
ic_gateway = b->relay_ip;
|
||||
if (ic_nameservers[0] == NONE)
|
||||
@@ -1268,7 +1272,7 @@ static int __init ic_dynamic(void)
|
||||
printk("IP-Config: Got %s answer from %pI4, ",
|
||||
((ic_got_reply & IC_RARP) ? "RARP"
|
||||
: (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"),
|
||||
&ic_servaddr);
|
||||
&ic_addrservaddr);
|
||||
pr_cont("my address is %pI4\n", &ic_myaddr);
|
||||
|
||||
return 0;
|
||||
|
@@ -81,6 +81,7 @@ static void send_reset(struct sk_buff *oldskb, int hook)
|
||||
niph->saddr = oiph->daddr;
|
||||
niph->daddr = oiph->saddr;
|
||||
|
||||
skb_reset_transport_header(nskb);
|
||||
tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr));
|
||||
memset(tcph, 0, sizeof(*tcph));
|
||||
tcph->source = oth->dest;
|
||||
|
@@ -124,23 +124,28 @@ nf_nat_ipv4_fn(unsigned int hooknum,
|
||||
ret = nf_nat_rule_find(skb, hooknum, in, out, ct);
|
||||
if (ret != NF_ACCEPT)
|
||||
return ret;
|
||||
} else
|
||||
} else {
|
||||
pr_debug("Already setup manip %s for ct %p\n",
|
||||
maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST",
|
||||
ct);
|
||||
if (nf_nat_oif_changed(hooknum, ctinfo, nat, out))
|
||||
goto oif_changed;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/* ESTABLISHED */
|
||||
NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED ||
|
||||
ctinfo == IP_CT_ESTABLISHED_REPLY);
|
||||
if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) {
|
||||
nf_ct_kill_acct(ct, ctinfo, skb);
|
||||
return NF_DROP;
|
||||
}
|
||||
if (nf_nat_oif_changed(hooknum, ctinfo, nat, out))
|
||||
goto oif_changed;
|
||||
}
|
||||
|
||||
return nf_nat_packet(ct, ctinfo, hooknum, skb);
|
||||
|
||||
oif_changed:
|
||||
nf_ct_kill_acct(ct, ctinfo, skb);
|
||||
return NF_DROP;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
@@ -1428,12 +1428,12 @@ static void tcp_service_net_dma(struct sock *sk, bool wait)
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off)
|
||||
static struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
u32 offset;
|
||||
|
||||
skb_queue_walk(&sk->sk_receive_queue, skb) {
|
||||
while ((skb = skb_peek(&sk->sk_receive_queue)) != NULL) {
|
||||
offset = seq - TCP_SKB_CB(skb)->seq;
|
||||
if (tcp_hdr(skb)->syn)
|
||||
offset--;
|
||||
@@ -1441,6 +1441,11 @@ static inline struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off)
|
||||
*off = offset;
|
||||
return skb;
|
||||
}
|
||||
/* This looks weird, but this can happen if TCP collapsing
|
||||
* splitted a fat GRO packet, while we released socket lock
|
||||
* in skb_splice_bits()
|
||||
*/
|
||||
sk_eat_skb(sk, skb, false);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1482,7 +1487,7 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
|
||||
break;
|
||||
}
|
||||
used = recv_actor(desc, skb, offset, len);
|
||||
if (used < 0) {
|
||||
if (used <= 0) {
|
||||
if (!copied)
|
||||
copied = used;
|
||||
break;
|
||||
@@ -1520,8 +1525,10 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
|
||||
tcp_rcv_space_adjust(sk);
|
||||
|
||||
/* Clean up data we have read: This will do ACK frames. */
|
||||
if (copied > 0)
|
||||
if (copied > 0) {
|
||||
tcp_recv_skb(sk, seq, &offset);
|
||||
tcp_cleanup_rbuf(sk, copied);
|
||||
}
|
||||
return copied;
|
||||
}
|
||||
EXPORT_SYMBOL(tcp_read_sock);
|
||||
|
@@ -5541,7 +5541,7 @@ slow_path:
|
||||
if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb))
|
||||
goto csum_error;
|
||||
|
||||
if (!th->ack)
|
||||
if (!th->ack && !th->rst)
|
||||
goto discard;
|
||||
|
||||
/*
|
||||
@@ -5986,7 +5986,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
||||
goto discard;
|
||||
}
|
||||
|
||||
if (!th->ack)
|
||||
if (!th->ack && !th->rst)
|
||||
goto discard;
|
||||
|
||||
if (!tcp_validate_incoming(sk, skb, th, 0))
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user