Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97930
b: refs/heads/master
c: ce4a7d0
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Jun 10, 2008
1 parent 79dbb29 commit 656fe83
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 45d465bc237ab1e1ebb4c65b9b318830dafb7509
refs/heads/master: ce4a7d0d48bbaed78ccbb0bafb9229651a40303a
4 changes: 3 additions & 1 deletion trunk/include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op
{
struct request_sock *req = reqsk_alloc(ops);

if (req != NULL)
if (req != NULL) {
inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req);
inet6_rsk(req)->pktopts = NULL;
}

return req;
}
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/net/inet_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,14 @@ static inline int inet_iif(const struct sk_buff *skb)
return skb->rtable->rt_iif;
}

static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops)
{
struct request_sock *req = reqsk_alloc(ops);

if (req != NULL)
inet_rsk(req)->opt = NULL;

return req;
}

#endif /* _INET_SOCK_H */
3 changes: 1 addition & 2 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
goto drop;

req = reqsk_alloc(&dccp_request_sock_ops);
req = inet_reqsk_alloc(&dccp_request_sock_ops);
if (req == NULL)
goto drop;

Expand All @@ -605,7 +605,6 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
ireq = inet_rsk(req);
ireq->loc_addr = ip_hdr(skb)->daddr;
ireq->rmt_addr = ip_hdr(skb)->saddr;
ireq->opt = NULL;

/*
* Step 3: Process LISTEN state
Expand Down
1 change: 0 additions & 1 deletion trunk/net/dccp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
ireq6 = inet6_rsk(req);
ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr);
ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr);
ireq6->pktopts = NULL;

if (ipv6_opt_accepted(sk, skb) ||
np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/ipv4/syncookies.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
cookie_check_timestamp(&tcp_opt);

ret = NULL;
req = reqsk_alloc(&tcp_request_sock_ops); /* for safety */
req = inet_reqsk_alloc(&tcp_request_sock_ops); /* for safety */
if (!req)
goto out;

Expand All @@ -301,7 +301,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
ireq->rmt_port = th->source;
ireq->loc_addr = ip_hdr(skb)->daddr;
ireq->rmt_addr = ip_hdr(skb)->saddr;
ireq->opt = NULL;
ireq->snd_wscale = tcp_opt.snd_wscale;
ireq->rcv_wscale = tcp_opt.rcv_wscale;
ireq->sack_ok = tcp_opt.sack_ok;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
goto drop;

req = reqsk_alloc(&tcp_request_sock_ops);
req = inet_reqsk_alloc(&tcp_request_sock_ops);
if (!req)
goto drop;

Expand Down
1 change: 0 additions & 1 deletion trunk/net/ipv6/syncookies.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
ireq = inet_rsk(req);
ireq6 = inet6_rsk(req);
treq = tcp_rsk(req);
ireq6->pktopts = NULL;

if (security_inet_conn_request(sk, skb, req)) {
reqsk_free(req);
Expand Down
1 change: 0 additions & 1 deletion trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
treq = inet6_rsk(req);
ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr);
ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr);
treq->pktopts = NULL;
if (!want_cookie)
TCP_ECN_create_request(req, tcp_hdr(skb));

Expand Down

0 comments on commit 656fe83

Please sign in to comment.