aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-02 16:37:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-02 16:37:18 -0400
commit90d5ffc729e92bffc0f84e2447e2e6dc280240a5 (patch)
treeee8e912a1e92ea612843af7492199e977f29ee89 /net
parent0efe5e32c8729ef44b00d9a7203e4c99a6378b27 (diff)
parent6053bbf7bbdbb2c94547f830ad07636c17d7024e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits) cnic: Fix NETDEV_UP event processing. uvesafb/connector: Disallow unpliviged users to send netlink packets pohmelfs/connector: Disallow unpliviged users to configure pohmelfs dst/connector: Disallow unpliviged users to configure dst dm/connector: Only process connector packages from privileged processes connector: Removed the destruct_data callback since it is always kfree_skb() connector/dm: Fixed a compilation warning connector: Provide the sender's credentials to the callback connector: Keep the skb in cn_callback_data e1000e/igb/ixgbe: Don't report an error if devices don't support AER net: Fix wrong sizeof net: splice() from tcp to pipe should take into account O_NONBLOCK net: Use sk_mark for routing lookup in more places sky2: irqname based on pci address skge: use unique IRQ name IPv4 TCP fails to send window scale option when window scale is zero net/ipv4/tcp.c: fix min() type mismatch warning Kconfig: STRIP: Remove stale bits of STRIP help text NET: mkiss: Fix typo tg3: Remove prev_vlan_tag from struct tx_ring_info ...
Diffstat (limited to 'net')
-rw-r--r--net/core/pktgen.c6
-rw-r--r--net/ipv4/af_inet.c1
-rw-r--r--net/ipv4/ip_output.c1
-rw-r--r--net/ipv4/tcp.c4
-rw-r--r--net/ipv4/tcp_output.c11
-rw-r--r--net/ipv4/udp.c1
-rw-r--r--net/mac80211/tx.c5
7 files changed, 19 insertions, 10 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 4d11c28ca8ca..b69455217ed6 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2105,15 +2105,17 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
2105static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until) 2105static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
2106{ 2106{
2107 ktime_t start_time, end_time; 2107 ktime_t start_time, end_time;
2108 s32 remaining; 2108 s64 remaining;
2109 struct hrtimer_sleeper t; 2109 struct hrtimer_sleeper t;
2110 2110
2111 hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 2111 hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
2112 hrtimer_set_expires(&t.timer, spin_until); 2112 hrtimer_set_expires(&t.timer, spin_until);
2113 2113
2114 remaining = ktime_to_us(hrtimer_expires_remaining(&t.timer)); 2114 remaining = ktime_to_us(hrtimer_expires_remaining(&t.timer));
2115 if (remaining <= 0) 2115 if (remaining <= 0) {
2116 pkt_dev->next_tx = ktime_add_ns(spin_until, pkt_dev->delay);
2116 return; 2117 return;
2118 }
2117 2119
2118 start_time = ktime_now(); 2120 start_time = ktime_now();
2119 if (remaining < 100) 2121 if (remaining < 100)
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 58c4b0f7c4aa..57737b8d1711 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1119,6 +1119,7 @@ int inet_sk_rebuild_header(struct sock *sk)
1119{ 1119{
1120 struct flowi fl = { 1120 struct flowi fl = {
1121 .oif = sk->sk_bound_dev_if, 1121 .oif = sk->sk_bound_dev_if,
1122 .mark = sk->sk_mark,
1122 .nl_u = { 1123 .nl_u = {
1123 .ip4_u = { 1124 .ip4_u = {
1124 .daddr = daddr, 1125 .daddr = daddr,
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 9fe5d7b81580..f9895180f481 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -335,6 +335,7 @@ int ip_queue_xmit(struct sk_buff *skb, int ipfragok)
335 335
336 { 336 {
337 struct flowi fl = { .oif = sk->sk_bound_dev_if, 337 struct flowi fl = { .oif = sk->sk_bound_dev_if,
338 .mark = sk->sk_mark,
338 .nl_u = { .ip4_u = 339 .nl_u = { .ip4_u =
339 { .daddr = daddr, 340 { .daddr = daddr,
340 .saddr = inet->saddr, 341 .saddr = inet->saddr,
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5a15e7629d8e..64d0af675823 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -580,7 +580,7 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
580 580
581 lock_sock(sk); 581 lock_sock(sk);
582 582
583 timeo = sock_rcvtimeo(sk, flags & SPLICE_F_NONBLOCK); 583 timeo = sock_rcvtimeo(sk, sock->file->f_flags & O_NONBLOCK);
584 while (tss.len) { 584 while (tss.len) {
585 ret = __tcp_splice_read(sk, &tss); 585 ret = __tcp_splice_read(sk, &tss);
586 if (ret < 0) 586 if (ret < 0)
@@ -2047,7 +2047,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2047 return -EINVAL; 2047 return -EINVAL;
2048 2048
2049 val = strncpy_from_user(name, optval, 2049 val = strncpy_from_user(name, optval,
2050 min(TCP_CA_NAME_MAX-1, optlen)); 2050 min_t(long, TCP_CA_NAME_MAX-1, optlen));
2051 if (val < 0) 2051 if (val < 0)
2052 return -EFAULT; 2052 return -EFAULT;
2053 name[val] = 0; 2053 name[val] = 0;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 5200aab0ca97..fcd278a7080e 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -361,6 +361,7 @@ static inline int tcp_urg_mode(const struct tcp_sock *tp)
361#define OPTION_SACK_ADVERTISE (1 << 0) 361#define OPTION_SACK_ADVERTISE (1 << 0)
362#define OPTION_TS (1 << 1) 362#define OPTION_TS (1 << 1)
363#define OPTION_MD5 (1 << 2) 363#define OPTION_MD5 (1 << 2)
364#define OPTION_WSCALE (1 << 3)
364 365
365struct tcp_out_options { 366struct tcp_out_options {
366 u8 options; /* bit field of OPTION_* */ 367 u8 options; /* bit field of OPTION_* */
@@ -427,7 +428,7 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
427 TCPOLEN_SACK_PERM); 428 TCPOLEN_SACK_PERM);
428 } 429 }
429 430
430 if (unlikely(opts->ws)) { 431 if (unlikely(OPTION_WSCALE & opts->options)) {
431 *ptr++ = htonl((TCPOPT_NOP << 24) | 432 *ptr++ = htonl((TCPOPT_NOP << 24) |
432 (TCPOPT_WINDOW << 16) | 433 (TCPOPT_WINDOW << 16) |
433 (TCPOLEN_WINDOW << 8) | 434 (TCPOLEN_WINDOW << 8) |
@@ -494,8 +495,8 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb,
494 } 495 }
495 if (likely(sysctl_tcp_window_scaling)) { 496 if (likely(sysctl_tcp_window_scaling)) {
496 opts->ws = tp->rx_opt.rcv_wscale; 497 opts->ws = tp->rx_opt.rcv_wscale;
497 if (likely(opts->ws)) 498 opts->options |= OPTION_WSCALE;
498 size += TCPOLEN_WSCALE_ALIGNED; 499 size += TCPOLEN_WSCALE_ALIGNED;
499 } 500 }
500 if (likely(sysctl_tcp_sack)) { 501 if (likely(sysctl_tcp_sack)) {
501 opts->options |= OPTION_SACK_ADVERTISE; 502 opts->options |= OPTION_SACK_ADVERTISE;
@@ -537,8 +538,8 @@ static unsigned tcp_synack_options(struct sock *sk,
537 538
538 if (likely(ireq->wscale_ok)) { 539 if (likely(ireq->wscale_ok)) {
539 opts->ws = ireq->rcv_wscale; 540 opts->ws = ireq->rcv_wscale;
540 if (likely(opts->ws)) 541 opts->options |= OPTION_WSCALE;
541 size += TCPOLEN_WSCALE_ALIGNED; 542 size += TCPOLEN_WSCALE_ALIGNED;
542 } 543 }
543 if (likely(doing_ts)) { 544 if (likely(doing_ts)) {
544 opts->options |= OPTION_TS; 545 opts->options |= OPTION_TS;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 3326aff65906..6ec6a8a4a224 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -696,6 +696,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
696 696
697 if (rt == NULL) { 697 if (rt == NULL) {
698 struct flowi fl = { .oif = ipc.oif, 698 struct flowi fl = { .oif = ipc.oif,
699 .mark = sk->sk_mark,
699 .nl_u = { .ip4_u = 700 .nl_u = { .ip4_u =
700 { .daddr = faddr, 701 { .daddr = faddr,
701 .saddr = saddr, 702 .saddr = saddr,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 5143d203256b..fd4028296613 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -367,7 +367,10 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
367 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; 367 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
368 u32 staflags; 368 u32 staflags;
369 369
370 if (unlikely(!sta || ieee80211_is_probe_resp(hdr->frame_control))) 370 if (unlikely(!sta || ieee80211_is_probe_resp(hdr->frame_control)
371 || ieee80211_is_auth(hdr->frame_control)
372 || ieee80211_is_assoc_resp(hdr->frame_control)
373 || ieee80211_is_reassoc_resp(hdr->frame_control)))
371 return TX_CONTINUE; 374 return TX_CONTINUE;
372 375
373 staflags = get_sta_flags(sta); 376 staflags = get_sta_flags(sta);