Commit 6634160a authored by Linus Torvalds's avatar Linus Torvalds

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:
  syncookies: fix inclusion of tcp options in syn-ack
  libertas: free sk_buff with kfree_skb
  btsdio: free sk_buff with kfree_skb
  Phonet: do not reply to indication reset packets
  Phonet: include generic link-layer header size in MAX_PHONET_HEADER
parents 526719ba 8b5f12d0
...@@ -152,7 +152,7 @@ static int btsdio_rx_packet(struct btsdio_data *data) ...@@ -152,7 +152,7 @@ static int btsdio_rx_packet(struct btsdio_data *data)
err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4); err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4);
if (err < 0) { if (err < 0) {
kfree(skb); kfree_skb(skb);
return err; return err;
} }
......
...@@ -328,7 +328,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, ...@@ -328,7 +328,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
lbs_deb_rx("rx err: frame received with bad length\n"); lbs_deb_rx("rx err: frame received with bad length\n");
priv->stats.rx_length_errors++; priv->stats.rx_length_errors++;
ret = -EINVAL; ret = -EINVAL;
kfree(skb); kfree_skb(skb);
goto done; goto done;
} }
......
...@@ -72,6 +72,7 @@ struct phonetmsg { ...@@ -72,6 +72,7 @@ struct phonetmsg {
} pn_msg_u; } pn_msg_u;
}; };
#define PN_COMMON_MESSAGE 0xF0 #define PN_COMMON_MESSAGE 0xF0
#define PN_COMMGR 0x10
#define PN_PREFIX 0xE0 /* resource for extended messages */ #define PN_PREFIX 0xE0 /* resource for extended messages */
#define pn_submsg_id pn_msg_u.base.pn_submsg_id #define pn_submsg_id pn_msg_u.base.pn_submsg_id
#define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id #define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* The lower layers may not require more space, ever. Make sure it's * The lower layers may not require more space, ever. Make sure it's
* enough. * enough.
*/ */
#define MAX_PHONET_HEADER 8 #define MAX_PHONET_HEADER (8 + MAX_HEADER)
/* /*
* Every Phonet* socket has this structure first in its * Every Phonet* socket has this structure first in its
......
...@@ -2279,6 +2279,11 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, ...@@ -2279,6 +2279,11 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
} }
memset(&opts, 0, sizeof(opts)); memset(&opts, 0, sizeof(opts));
#ifdef CONFIG_SYN_COOKIES
if (unlikely(req->cookie_ts))
TCP_SKB_CB(skb)->when = cookie_init_timestamp(req);
else
#endif
TCP_SKB_CB(skb)->when = tcp_time_stamp; TCP_SKB_CB(skb)->when = tcp_time_stamp;
tcp_header_size = tcp_synack_options(sk, req, mss, tcp_header_size = tcp_synack_options(sk, req, mss,
skb, &opts, &md5) + skb, &opts, &md5) +
...@@ -2304,11 +2309,6 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, ...@@ -2304,11 +2309,6 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
/* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */
th->window = htons(min(req->rcv_wnd, 65535U)); th->window = htons(min(req->rcv_wnd, 65535U));
#ifdef CONFIG_SYN_COOKIES
if (unlikely(req->cookie_ts))
TCP_SKB_CB(skb)->when = cookie_init_timestamp(req);
else
#endif
tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location); tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location);
th->doff = (tcp_header_size >> 2); th->doff = (tcp_header_size >> 2);
TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
......
...@@ -261,6 +261,8 @@ static inline int can_respond(struct sk_buff *skb) ...@@ -261,6 +261,8 @@ static inline int can_respond(struct sk_buff *skb)
return 0; /* we are not the destination */ return 0; /* we are not the destination */
if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5)) if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5))
return 0; return 0;
if (ph->pn_res == PN_COMMGR) /* indications */
return 0;
ph = pn_hdr(skb); /* re-acquires the pointer */ ph = pn_hdr(skb); /* re-acquires the pointer */
pm = pn_msg(skb); pm = pn_msg(skb);
...@@ -309,7 +311,8 @@ static int send_reset_indications(struct sk_buff *rskb) ...@@ -309,7 +311,8 @@ static int send_reset_indications(struct sk_buff *rskb)
return pn_raw_send(data, sizeof(data), rskb->dev, return pn_raw_send(data, sizeof(data), rskb->dev,
pn_object(oph->pn_sdev, 0x00), pn_object(oph->pn_sdev, 0x00),
pn_object(oph->pn_rdev, oph->pn_robj), 0x10); pn_object(oph->pn_rdev, oph->pn_robj),
PN_COMMGR);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment