diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/addrconf.h | 22 | ||||
-rw-r--r-- | include/net/genetlink.h | 4 | ||||
-rw-r--r-- | include/net/inet_sock.h | 10 | ||||
-rw-r--r-- | include/net/ipv6.h | 6 | ||||
-rw-r--r-- | include/net/mac80211.h | 9 | ||||
-rw-r--r-- | include/net/net_namespace.h | 11 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_extend.h | 1 | ||||
-rw-r--r-- | include/net/netlink.h | 20 | ||||
-rw-r--r-- | include/net/request_sock.h | 4 | ||||
-rw-r--r-- | include/net/sch_generic.h | 2 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 17 | ||||
-rw-r--r-- | include/net/tcp.h | 2 | ||||
-rw-r--r-- | include/net/transp_v6.h | 3 | ||||
-rw-r--r-- | include/net/udp.h | 1 |
14 files changed, 90 insertions, 22 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 0a2f0372df31..bbd3d583c6e6 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -94,6 +94,28 @@ extern void addrconf_join_solict(struct net_device *dev, | |||
94 | extern void addrconf_leave_solict(struct inet6_dev *idev, | 94 | extern void addrconf_leave_solict(struct inet6_dev *idev, |
95 | struct in6_addr *addr); | 95 | struct in6_addr *addr); |
96 | 96 | ||
97 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, | ||
98 | unsigned unit) | ||
99 | { | ||
100 | if (timeout == 0xffffffff) | ||
101 | return ~0UL; | ||
102 | |||
103 | /* | ||
104 | * Avoid arithmetic overflow. | ||
105 | * Assuming unit is constant and non-zero, this "if" statement | ||
106 | * will go away on 64bit archs. | ||
107 | */ | ||
108 | if (0xfffffffe > LONG_MAX / unit && timeout > LONG_MAX / unit) | ||
109 | return LONG_MAX / unit; | ||
110 | |||
111 | return timeout; | ||
112 | } | ||
113 | |||
114 | static inline int addrconf_finite_timeout(unsigned long timeout) | ||
115 | { | ||
116 | return ~timeout; | ||
117 | } | ||
118 | |||
97 | /* | 119 | /* |
98 | * IPv6 Address Label subsystem (addrlabel.c) | 120 | * IPv6 Address Label subsystem (addrlabel.c) |
99 | */ | 121 | */ |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index decdda546829..747c255d1df0 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | |||
162 | * @skb: socket buffer the message is stored in | 162 | * @skb: socket buffer the message is stored in |
163 | * @hdr: generic netlink message header | 163 | * @hdr: generic netlink message header |
164 | */ | 164 | */ |
165 | static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr) | 165 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) |
166 | { | 166 | { |
167 | return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 167 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index a42cd63d241a..9fabe5b38912 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -197,4 +197,14 @@ static inline int inet_iif(const struct sk_buff *skb) | |||
197 | return skb->rtable->rt_iif; | 197 | return skb->rtable->rt_iif; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) | ||
201 | { | ||
202 | struct request_sock *req = reqsk_alloc(ops); | ||
203 | |||
204 | if (req != NULL) | ||
205 | inet_rsk(req)->opt = NULL; | ||
206 | |||
207 | return req; | ||
208 | } | ||
209 | |||
200 | #endif /* _INET_SOCK_H */ | 210 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e0a612bc9c4e..f422f7218e1c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -367,6 +367,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a) | |||
367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); | 367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); |
368 | } | 368 | } |
369 | 369 | ||
370 | static inline int ipv6_addr_loopback(const struct in6_addr *a) | ||
371 | { | ||
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | ||
373 | a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0); | ||
374 | } | ||
375 | |||
370 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) | 376 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) |
371 | { | 377 | { |
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | 378 | return ((a->s6_addr32[0] | a->s6_addr32[1] | |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index dae3f9ec1154..bcd1623245cb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -595,6 +595,15 @@ enum ieee80211_key_alg { | |||
595 | ALG_CCMP, | 595 | ALG_CCMP, |
596 | }; | 596 | }; |
597 | 597 | ||
598 | /** | ||
599 | * enum ieee80211_key_len - key length | ||
600 | * @WEP40: WEP 5 byte long key | ||
601 | * @WEP104: WEP 13 byte long key | ||
602 | */ | ||
603 | enum ieee80211_key_len { | ||
604 | LEN_WEP40 = 5, | ||
605 | LEN_WEP104 = 13, | ||
606 | }; | ||
598 | 607 | ||
599 | /** | 608 | /** |
600 | * enum ieee80211_key_flags - key flags | 609 | * enum ieee80211_key_flags - key flags |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index aa540e6be502..d9dd0f707296 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -95,6 +95,11 @@ extern struct list_head net_namespace_list; | |||
95 | #ifdef CONFIG_NET_NS | 95 | #ifdef CONFIG_NET_NS |
96 | extern void __put_net(struct net *net); | 96 | extern void __put_net(struct net *net); |
97 | 97 | ||
98 | static inline int net_alive(struct net *net) | ||
99 | { | ||
100 | return net && atomic_read(&net->count); | ||
101 | } | ||
102 | |||
98 | static inline struct net *get_net(struct net *net) | 103 | static inline struct net *get_net(struct net *net) |
99 | { | 104 | { |
100 | atomic_inc(&net->count); | 105 | atomic_inc(&net->count); |
@@ -125,6 +130,12 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
125 | return net1 == net2; | 130 | return net1 == net2; |
126 | } | 131 | } |
127 | #else | 132 | #else |
133 | |||
134 | static inline int net_alive(struct net *net) | ||
135 | { | ||
136 | return 1; | ||
137 | } | ||
138 | |||
128 | static inline struct net *get_net(struct net *net) | 139 | static inline struct net *get_net(struct net *net) |
129 | { | 140 | { |
130 | return net; | 141 | return net; |
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index f736e842977f..f80c0ed6d870 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -15,6 +15,7 @@ enum nf_ct_ext_id | |||
15 | 15 | ||
16 | /* Extensions: optional stuff which isn't permanently in struct. */ | 16 | /* Extensions: optional stuff which isn't permanently in struct. */ |
17 | struct nf_ct_ext { | 17 | struct nf_ct_ext { |
18 | struct rcu_head rcu; | ||
18 | u8 offset[NF_CT_EXT_NUM]; | 19 | u8 offset[NF_CT_EXT_NUM]; |
19 | u8 len; | 20 | u8 len; |
20 | char data[0]; | 21 | char data[0]; |
diff --git a/include/net/netlink.h b/include/net/netlink.h index 112dcdf7e34e..dfc3701dfcc3 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -556,14 +556,12 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb) | |||
556 | * @skb: socket buffer the message is stored in | 556 | * @skb: socket buffer the message is stored in |
557 | * @mark: mark to trim to | 557 | * @mark: mark to trim to |
558 | * | 558 | * |
559 | * Trims the message to the provided mark. Returns -1. | 559 | * Trims the message to the provided mark. |
560 | */ | 560 | */ |
561 | static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | 561 | static inline void nlmsg_trim(struct sk_buff *skb, const void *mark) |
562 | { | 562 | { |
563 | if (mark) | 563 | if (mark) |
564 | skb_trim(skb, (unsigned char *) mark - skb->data); | 564 | skb_trim(skb, (unsigned char *) mark - skb->data); |
565 | |||
566 | return -1; | ||
567 | } | 565 | } |
568 | 566 | ||
569 | /** | 567 | /** |
@@ -572,11 +570,11 @@ static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | |||
572 | * @nlh: netlink message header | 570 | * @nlh: netlink message header |
573 | * | 571 | * |
574 | * Removes the complete netlink message including all | 572 | * Removes the complete netlink message including all |
575 | * attributes from the socket buffer again. Returns -1. | 573 | * attributes from the socket buffer again. |
576 | */ | 574 | */ |
577 | static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) | 575 | static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) |
578 | { | 576 | { |
579 | return nlmsg_trim(skb, nlh); | 577 | nlmsg_trim(skb, nlh); |
580 | } | 578 | } |
581 | 579 | ||
582 | /** | 580 | /** |
@@ -775,7 +773,7 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
775 | int nested_len = nla_len(nla) - NLA_ALIGN(len); | 773 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
776 | 774 | ||
777 | if (nested_len < 0) | 775 | if (nested_len < 0) |
778 | return -1; | 776 | return -EINVAL; |
779 | if (nested_len >= nla_attr_size(0)) | 777 | if (nested_len >= nla_attr_size(0)) |
780 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), | 778 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
781 | nested_len, policy); | 779 | nested_len, policy); |
@@ -1080,11 +1078,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start) | |||
1080 | * @start: container attribute | 1078 | * @start: container attribute |
1081 | * | 1079 | * |
1082 | * Removes the container attribute and including all nested | 1080 | * Removes the container attribute and including all nested |
1083 | * attributes. Returns -1. | 1081 | * attributes. Returns -EMSGSIZE |
1084 | */ | 1082 | */ |
1085 | static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) | 1083 | static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) |
1086 | { | 1084 | { |
1087 | return nlmsg_trim(skb, start); | 1085 | nlmsg_trim(skb, start); |
1088 | } | 1086 | } |
1089 | 1087 | ||
1090 | /** | 1088 | /** |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index b220b5f624de..0c96e7bed5db 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -115,8 +115,8 @@ struct request_sock_queue { | |||
115 | struct request_sock *rskq_accept_head; | 115 | struct request_sock *rskq_accept_head; |
116 | struct request_sock *rskq_accept_tail; | 116 | struct request_sock *rskq_accept_tail; |
117 | rwlock_t syn_wait_lock; | 117 | rwlock_t syn_wait_lock; |
118 | u16 rskq_defer_accept; | 118 | u8 rskq_defer_accept; |
119 | /* 2 bytes hole, try to pack */ | 119 | /* 3 bytes hole, try to pack */ |
120 | struct listen_sock *listen_opt; | 120 | struct listen_sock *listen_opt; |
121 | }; | 121 | }; |
122 | 122 | ||
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ab502ec1c61c..a87fc0312edc 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -178,7 +178,7 @@ extern struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops); | |||
178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, | 178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, |
179 | struct Qdisc_ops *ops, u32 parentid); | 179 | struct Qdisc_ops *ops, u32 parentid); |
180 | extern void tcf_destroy(struct tcf_proto *tp); | 180 | extern void tcf_destroy(struct tcf_proto *tp); |
181 | extern void tcf_destroy_chain(struct tcf_proto *fl); | 181 | extern void tcf_destroy_chain(struct tcf_proto **fl); |
182 | 182 | ||
183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
184 | struct sk_buff_head *list) | 184 | struct sk_buff_head *list) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 0ce0443c5b79..7f25195f9855 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -548,7 +548,8 @@ struct sctp_af { | |||
548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, | 548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, |
549 | union sctp_addr *daddr, | 549 | union sctp_addr *daddr, |
550 | union sctp_addr *saddr); | 550 | union sctp_addr *saddr); |
551 | void (*get_saddr) (struct sctp_association *asoc, | 551 | void (*get_saddr) (struct sctp_sock *sk, |
552 | struct sctp_association *asoc, | ||
552 | struct dst_entry *dst, | 553 | struct dst_entry *dst, |
553 | union sctp_addr *daddr, | 554 | union sctp_addr *daddr, |
554 | union sctp_addr *saddr); | 555 | union sctp_addr *saddr); |
@@ -587,6 +588,7 @@ struct sctp_af { | |||
587 | int (*is_ce) (const struct sk_buff *sk); | 588 | int (*is_ce) (const struct sk_buff *sk); |
588 | void (*seq_dump_addr)(struct seq_file *seq, | 589 | void (*seq_dump_addr)(struct seq_file *seq, |
589 | union sctp_addr *addr); | 590 | union sctp_addr *addr); |
591 | void (*ecn_capable)(struct sock *sk); | ||
590 | __u16 net_header_len; | 592 | __u16 net_header_len; |
591 | int sockaddr_len; | 593 | int sockaddr_len; |
592 | sa_family_t sa_family; | 594 | sa_family_t sa_family; |
@@ -901,7 +903,10 @@ struct sctp_transport { | |||
901 | * calculation completes (i.e. the DATA chunk | 903 | * calculation completes (i.e. the DATA chunk |
902 | * is SACK'd) clear this flag. | 904 | * is SACK'd) clear this flag. |
903 | */ | 905 | */ |
904 | int rto_pending; | 906 | __u8 rto_pending; |
907 | |||
908 | /* Flag to track the current fast recovery state */ | ||
909 | __u8 fast_recovery; | ||
905 | 910 | ||
906 | /* | 911 | /* |
907 | * These are the congestion stats. | 912 | * These are the congestion stats. |
@@ -920,6 +925,9 @@ struct sctp_transport { | |||
920 | /* Data that has been sent, but not acknowledged. */ | 925 | /* Data that has been sent, but not acknowledged. */ |
921 | __u32 flight_size; | 926 | __u32 flight_size; |
922 | 927 | ||
928 | /* TSN marking the fast recovery exit point */ | ||
929 | __u32 fast_recovery_exit; | ||
930 | |||
923 | /* Destination */ | 931 | /* Destination */ |
924 | struct dst_entry *dst; | 932 | struct dst_entry *dst; |
925 | /* Source address. */ | 933 | /* Source address. */ |
@@ -1044,7 +1052,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | |||
1044 | struct sctp_sock *); | 1052 | struct sctp_sock *); |
1045 | void sctp_transport_pmtu(struct sctp_transport *); | 1053 | void sctp_transport_pmtu(struct sctp_transport *); |
1046 | void sctp_transport_free(struct sctp_transport *); | 1054 | void sctp_transport_free(struct sctp_transport *); |
1047 | void sctp_transport_reset_timers(struct sctp_transport *); | 1055 | void sctp_transport_reset_timers(struct sctp_transport *, int); |
1048 | void sctp_transport_hold(struct sctp_transport *); | 1056 | void sctp_transport_hold(struct sctp_transport *); |
1049 | void sctp_transport_put(struct sctp_transport *); | 1057 | void sctp_transport_put(struct sctp_transport *); |
1050 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1058 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
@@ -1134,6 +1142,9 @@ struct sctp_outq { | |||
1134 | /* How many unackd bytes do we have in-flight? */ | 1142 | /* How many unackd bytes do we have in-flight? */ |
1135 | __u32 outstanding_bytes; | 1143 | __u32 outstanding_bytes; |
1136 | 1144 | ||
1145 | /* Are we doing fast-rtx on this queue */ | ||
1146 | char fast_rtx; | ||
1147 | |||
1137 | /* Corked? */ | 1148 | /* Corked? */ |
1138 | char cork; | 1149 | char cork; |
1139 | 1150 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 633147cb6bbc..cf54034019d9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
139 | #define MAX_TCP_KEEPINTVL 32767 | 139 | #define MAX_TCP_KEEPINTVL 32767 |
140 | #define MAX_TCP_KEEPCNT 127 | 140 | #define MAX_TCP_KEEPCNT 127 |
141 | #define MAX_TCP_SYNCNT 127 | 141 | #define MAX_TCP_SYNCNT 127 |
142 | #define MAX_TCP_ACCEPT_DEFERRED 65535 | ||
143 | 142 | ||
144 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ | 143 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ |
145 | 144 | ||
@@ -433,7 +432,6 @@ extern struct sk_buff * tcp_make_synack(struct sock *sk, | |||
433 | 432 | ||
434 | extern int tcp_disconnect(struct sock *sk, int flags); | 433 | extern int tcp_disconnect(struct sock *sk, int flags); |
435 | 434 | ||
436 | extern void tcp_unhash(struct sock *sk); | ||
437 | 435 | ||
438 | /* From syncookies.c */ | 436 | /* From syncookies.c */ |
439 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; | 437 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 27394e0447d8..112934a3288d 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -40,7 +40,8 @@ extern int datagram_recv_ctl(struct sock *sk, | |||
40 | struct msghdr *msg, | 40 | struct msghdr *msg, |
41 | struct sk_buff *skb); | 41 | struct sk_buff *skb); |
42 | 42 | ||
43 | extern int datagram_send_ctl(struct msghdr *msg, | 43 | extern int datagram_send_ctl(struct net *net, |
44 | struct msghdr *msg, | ||
44 | struct flowi *fl, | 45 | struct flowi *fl, |
45 | struct ipv6_txoptions *opt, | 46 | struct ipv6_txoptions *opt, |
46 | int *hlimit, int *tclass); | 47 | int *hlimit, int *tclass); |
diff --git a/include/net/udp.h b/include/net/udp.h index 3e55a99b0ba3..ccce83707046 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -135,6 +135,7 @@ extern void udp_err(struct sk_buff *, u32); | |||
135 | 135 | ||
136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | 136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
137 | struct msghdr *msg, size_t len); | 137 | struct msghdr *msg, size_t len); |
138 | extern void udp_flush_pending_frames(struct sock *sk); | ||
138 | 139 | ||
139 | extern int udp_rcv(struct sk_buff *skb); | 140 | extern int udp_rcv(struct sk_buff *skb); |
140 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 141 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |