diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-03 09:28:30 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-03 09:34:51 -0400 |
commit | ace1fe1231bdfffd60b5e703aa5b7283fbf98dbd (patch) | |
tree | 06c7492a8f3cc65f916768616ca24c6bc7171761 /include/net | |
parent | ce9f3f31efb88841e4df98794b13dbac8c4901da (diff) | |
parent | a2dc375e12334b3d8f787a48b2fb6172ccfb80ae (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
This merges (3f509c6 netfilter: nf_nat_sip: fix incorrect handling
of EBUSY for RTCP expectation) to Patrick McHardy's IPv6 NAT changes.
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ax25.h | 4 | ||||
-rw-r--r-- | include/net/cfg80211.h | 40 | ||||
-rw-r--r-- | include/net/ieee80211_radiotap.h | 11 | ||||
-rw-r--r-- | include/net/ipv6.h | 5 | ||||
-rw-r--r-- | include/net/mac80211.h | 87 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_ecache.h | 1 | ||||
-rw-r--r-- | include/net/netns/ipv4.h | 3 | ||||
-rw-r--r-- | include/net/netns/packet.h | 2 | ||||
-rw-r--r-- | include/net/request_sock.h | 49 | ||||
-rw-r--r-- | include/net/sch_generic.h | 3 | ||||
-rw-r--r-- | include/net/sock.h | 11 | ||||
-rw-r--r-- | include/net/tcp.h | 73 |
12 files changed, 234 insertions, 55 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h index 5d2352154cf6..53539acbd81a 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -157,7 +157,7 @@ enum { | |||
157 | typedef struct ax25_uid_assoc { | 157 | typedef struct ax25_uid_assoc { |
158 | struct hlist_node uid_node; | 158 | struct hlist_node uid_node; |
159 | atomic_t refcount; | 159 | atomic_t refcount; |
160 | uid_t uid; | 160 | kuid_t uid; |
161 | ax25_address call; | 161 | ax25_address call; |
162 | } ax25_uid_assoc; | 162 | } ax25_uid_assoc; |
163 | 163 | ||
@@ -434,7 +434,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
434 | 434 | ||
435 | /* ax25_uid.c */ | 435 | /* ax25_uid.c */ |
436 | extern int ax25_uid_policy; | 436 | extern int ax25_uid_policy; |
437 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); | 437 | extern ax25_uid_assoc *ax25_findbyuid(kuid_t); |
438 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 438 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
439 | extern const struct file_operations ax25_uid_fops; | 439 | extern const struct file_operations ax25_uid_fops; |
440 | extern void ax25_uid_free(void); | 440 | extern void ax25_uid_free(void); |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3d254e10ff30..ba2e6160fad1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1439,7 +1439,8 @@ struct cfg80211_gtk_rekey_data { | |||
1439 | * @add_virtual_intf: create a new virtual interface with the given name, | 1439 | * @add_virtual_intf: create a new virtual interface with the given name, |
1440 | * must set the struct wireless_dev's iftype. Beware: You must create | 1440 | * must set the struct wireless_dev's iftype. Beware: You must create |
1441 | * the new netdev in the wiphy's network namespace! Returns the struct | 1441 | * the new netdev in the wiphy's network namespace! Returns the struct |
1442 | * wireless_dev, or an ERR_PTR. | 1442 | * wireless_dev, or an ERR_PTR. For P2P device wdevs, the driver must |
1443 | * also set the address member in the wdev. | ||
1443 | * | 1444 | * |
1444 | * @del_virtual_intf: remove the virtual interface | 1445 | * @del_virtual_intf: remove the virtual interface |
1445 | * | 1446 | * |
@@ -1618,6 +1619,9 @@ struct cfg80211_gtk_rekey_data { | |||
1618 | * @get_channel: Get the current operating channel for the virtual interface. | 1619 | * @get_channel: Get the current operating channel for the virtual interface. |
1619 | * For monitor interfaces, it should return %NULL unless there's a single | 1620 | * For monitor interfaces, it should return %NULL unless there's a single |
1620 | * current monitoring channel. | 1621 | * current monitoring channel. |
1622 | * | ||
1623 | * @start_p2p_device: Start the given P2P device. | ||
1624 | * @stop_p2p_device: Stop the given P2P device. | ||
1621 | */ | 1625 | */ |
1622 | struct cfg80211_ops { | 1626 | struct cfg80211_ops { |
1623 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 1627 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
@@ -1834,6 +1838,11 @@ struct cfg80211_ops { | |||
1834 | (*get_channel)(struct wiphy *wiphy, | 1838 | (*get_channel)(struct wiphy *wiphy, |
1835 | struct wireless_dev *wdev, | 1839 | struct wireless_dev *wdev, |
1836 | enum nl80211_channel_type *type); | 1840 | enum nl80211_channel_type *type); |
1841 | |||
1842 | int (*start_p2p_device)(struct wiphy *wiphy, | ||
1843 | struct wireless_dev *wdev); | ||
1844 | void (*stop_p2p_device)(struct wiphy *wiphy, | ||
1845 | struct wireless_dev *wdev); | ||
1837 | }; | 1846 | }; |
1838 | 1847 | ||
1839 | /* | 1848 | /* |
@@ -2397,6 +2406,8 @@ struct cfg80211_cached_keys; | |||
2397 | * @cleanup_work: work struct used for cleanup that can't be done directly | 2406 | * @cleanup_work: work struct used for cleanup that can't be done directly |
2398 | * @beacon_interval: beacon interval used on this device for transmitting | 2407 | * @beacon_interval: beacon interval used on this device for transmitting |
2399 | * beacons, 0 when not valid | 2408 | * beacons, 0 when not valid |
2409 | * @address: The address for this device, valid only if @netdev is %NULL | ||
2410 | * @p2p_started: true if this is a P2P Device that has been started | ||
2400 | */ | 2411 | */ |
2401 | struct wireless_dev { | 2412 | struct wireless_dev { |
2402 | struct wiphy *wiphy; | 2413 | struct wiphy *wiphy; |
@@ -2415,7 +2426,9 @@ struct wireless_dev { | |||
2415 | 2426 | ||
2416 | struct work_struct cleanup_work; | 2427 | struct work_struct cleanup_work; |
2417 | 2428 | ||
2418 | bool use_4addr; | 2429 | bool use_4addr, p2p_started; |
2430 | |||
2431 | u8 address[ETH_ALEN] __aligned(sizeof(u16)); | ||
2419 | 2432 | ||
2420 | /* currently used for IBSS and SME - might be rearranged later */ | 2433 | /* currently used for IBSS and SME - might be rearranged later */ |
2421 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 2434 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
@@ -2463,6 +2476,13 @@ struct wireless_dev { | |||
2463 | #endif | 2476 | #endif |
2464 | }; | 2477 | }; |
2465 | 2478 | ||
2479 | static inline u8 *wdev_address(struct wireless_dev *wdev) | ||
2480 | { | ||
2481 | if (wdev->netdev) | ||
2482 | return wdev->netdev->dev_addr; | ||
2483 | return wdev->address; | ||
2484 | } | ||
2485 | |||
2466 | /** | 2486 | /** |
2467 | * wdev_priv - return wiphy priv from wireless_dev | 2487 | * wdev_priv - return wiphy priv from wireless_dev |
2468 | * | 2488 | * |
@@ -3530,6 +3550,22 @@ void cfg80211_ch_switch_notify(struct net_device *dev, int freq, | |||
3530 | */ | 3550 | */ |
3531 | u32 cfg80211_calculate_bitrate(struct rate_info *rate); | 3551 | u32 cfg80211_calculate_bitrate(struct rate_info *rate); |
3532 | 3552 | ||
3553 | /** | ||
3554 | * cfg80211_unregister_wdev - remove the given wdev | ||
3555 | * @wdev: struct wireless_dev to remove | ||
3556 | * | ||
3557 | * Call this function only for wdevs that have no netdev assigned, | ||
3558 | * e.g. P2P Devices. It removes the device from the list so that | ||
3559 | * it can no longer be used. It is necessary to call this function | ||
3560 | * even when cfg80211 requests the removal of the interface by | ||
3561 | * calling the del_virtual_intf() callback. The function must also | ||
3562 | * be called when the driver wishes to unregister the wdev, e.g. | ||
3563 | * when the device is unbound from the driver. | ||
3564 | * | ||
3565 | * Requires the RTNL to be held. | ||
3566 | */ | ||
3567 | void cfg80211_unregister_wdev(struct wireless_dev *wdev); | ||
3568 | |||
3533 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ | 3569 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ |
3534 | 3570 | ||
3535 | /* wiphy_printk helpers, similar to dev_printk */ | 3571 | /* wiphy_printk helpers, similar to dev_printk */ |
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 71392545d0a1..7f0df133d119 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -183,6 +183,9 @@ struct ieee80211_radiotap_header { | |||
183 | * Contains a bitmap of known fields/flags, the flags, and | 183 | * Contains a bitmap of known fields/flags, the flags, and |
184 | * the MCS index. | 184 | * the MCS index. |
185 | * | 185 | * |
186 | * IEEE80211_RADIOTAP_AMPDU_STATUS u32, u16, u8, u8 unitless | ||
187 | * | ||
188 | * Contains the AMPDU information for the subframe. | ||
186 | */ | 189 | */ |
187 | enum ieee80211_radiotap_type { | 190 | enum ieee80211_radiotap_type { |
188 | IEEE80211_RADIOTAP_TSFT = 0, | 191 | IEEE80211_RADIOTAP_TSFT = 0, |
@@ -205,6 +208,7 @@ enum ieee80211_radiotap_type { | |||
205 | IEEE80211_RADIOTAP_DATA_RETRIES = 17, | 208 | IEEE80211_RADIOTAP_DATA_RETRIES = 17, |
206 | 209 | ||
207 | IEEE80211_RADIOTAP_MCS = 19, | 210 | IEEE80211_RADIOTAP_MCS = 19, |
211 | IEEE80211_RADIOTAP_AMPDU_STATUS = 20, | ||
208 | 212 | ||
209 | /* valid in every it_present bitmap, even vendor namespaces */ | 213 | /* valid in every it_present bitmap, even vendor namespaces */ |
210 | IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29, | 214 | IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29, |
@@ -270,6 +274,13 @@ enum ieee80211_radiotap_type { | |||
270 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 | 274 | #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 |
271 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 | 275 | #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 |
272 | 276 | ||
277 | /* For IEEE80211_RADIOTAP_AMPDU_STATUS */ | ||
278 | #define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 | ||
279 | #define IEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN 0x0002 | ||
280 | #define IEEE80211_RADIOTAP_AMPDU_LAST_KNOWN 0x0004 | ||
281 | #define IEEE80211_RADIOTAP_AMPDU_IS_LAST 0x0008 | ||
282 | #define IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_ERR 0x0010 | ||
283 | #define IEEE80211_RADIOTAP_AMPDU_DELIM_CRC_KNOWN 0x0020 | ||
273 | 284 | ||
274 | /* helpers */ | 285 | /* helpers */ |
275 | static inline int ieee80211_get_radiotap_len(unsigned char *data) | 286 | static inline int ieee80211_get_radiotap_len(unsigned char *data) |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6d01fb00ff2b..9bed5d483405 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -223,7 +223,10 @@ struct ip6_flowlabel { | |||
223 | struct ipv6_txoptions *opt; | 223 | struct ipv6_txoptions *opt; |
224 | unsigned long linger; | 224 | unsigned long linger; |
225 | u8 share; | 225 | u8 share; |
226 | u32 owner; | 226 | union { |
227 | struct pid *pid; | ||
228 | kuid_t uid; | ||
229 | } owner; | ||
227 | unsigned long lastuse; | 230 | unsigned long lastuse; |
228 | unsigned long expires; | 231 | unsigned long expires; |
229 | struct net *fl_net; | 232 | struct net *fl_net; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index bb86aa6f98dd..71f8262fc1df 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -171,6 +171,7 @@ struct ieee80211_low_level_stats { | |||
171 | * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface. | 171 | * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface. |
172 | * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) | 172 | * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) |
173 | * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) | 173 | * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) |
174 | * @BSS_CHANGED_PS: PS changed for this BSS (STA mode) | ||
174 | */ | 175 | */ |
175 | enum ieee80211_bss_change { | 176 | enum ieee80211_bss_change { |
176 | BSS_CHANGED_ASSOC = 1<<0, | 177 | BSS_CHANGED_ASSOC = 1<<0, |
@@ -190,6 +191,7 @@ enum ieee80211_bss_change { | |||
190 | BSS_CHANGED_IDLE = 1<<14, | 191 | BSS_CHANGED_IDLE = 1<<14, |
191 | BSS_CHANGED_SSID = 1<<15, | 192 | BSS_CHANGED_SSID = 1<<15, |
192 | BSS_CHANGED_AP_PROBE_RESP = 1<<16, | 193 | BSS_CHANGED_AP_PROBE_RESP = 1<<16, |
194 | BSS_CHANGED_PS = 1<<17, | ||
193 | 195 | ||
194 | /* when adding here, make sure to change ieee80211_reconfig */ | 196 | /* when adding here, make sure to change ieee80211_reconfig */ |
195 | }; | 197 | }; |
@@ -266,6 +268,8 @@ enum ieee80211_rssi_event { | |||
266 | * @idle: This interface is idle. There's also a global idle flag in the | 268 | * @idle: This interface is idle. There's also a global idle flag in the |
267 | * hardware config which may be more appropriate depending on what | 269 | * hardware config which may be more appropriate depending on what |
268 | * your driver/device needs to do. | 270 | * your driver/device needs to do. |
271 | * @ps: power-save mode (STA only). This flag is NOT affected by | ||
272 | * offchannel/dynamic_ps operations. | ||
269 | * @ssid: The SSID of the current vif. Only valid in AP-mode. | 273 | * @ssid: The SSID of the current vif. Only valid in AP-mode. |
270 | * @ssid_len: Length of SSID given in @ssid. | 274 | * @ssid_len: Length of SSID given in @ssid. |
271 | * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. | 275 | * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. |
@@ -296,6 +300,7 @@ struct ieee80211_bss_conf { | |||
296 | bool arp_filter_enabled; | 300 | bool arp_filter_enabled; |
297 | bool qos; | 301 | bool qos; |
298 | bool idle; | 302 | bool idle; |
303 | bool ps; | ||
299 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 304 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
300 | size_t ssid_len; | 305 | size_t ssid_len; |
301 | bool hidden_ssid; | 306 | bool hidden_ssid; |
@@ -522,9 +527,6 @@ struct ieee80211_tx_rate { | |||
522 | * (2) driver internal use (if applicable) | 527 | * (2) driver internal use (if applicable) |
523 | * (3) TX status information - driver tells mac80211 what happened | 528 | * (3) TX status information - driver tells mac80211 what happened |
524 | * | 529 | * |
525 | * The TX control's sta pointer is only valid during the ->tx call, | ||
526 | * it may be NULL. | ||
527 | * | ||
528 | * @flags: transmit info flags, defined above | 530 | * @flags: transmit info flags, defined above |
529 | * @band: the band to transmit on (use for checking for races) | 531 | * @band: the band to transmit on (use for checking for races) |
530 | * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC | 532 | * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC |
@@ -555,6 +557,7 @@ struct ieee80211_tx_info { | |||
555 | struct ieee80211_tx_rate rates[ | 557 | struct ieee80211_tx_rate rates[ |
556 | IEEE80211_TX_MAX_RATES]; | 558 | IEEE80211_TX_MAX_RATES]; |
557 | s8 rts_cts_rate_idx; | 559 | s8 rts_cts_rate_idx; |
560 | /* 3 bytes free */ | ||
558 | }; | 561 | }; |
559 | /* only needed before rate control */ | 562 | /* only needed before rate control */ |
560 | unsigned long jiffies; | 563 | unsigned long jiffies; |
@@ -562,7 +565,7 @@ struct ieee80211_tx_info { | |||
562 | /* NB: vif can be NULL for injected frames */ | 565 | /* NB: vif can be NULL for injected frames */ |
563 | struct ieee80211_vif *vif; | 566 | struct ieee80211_vif *vif; |
564 | struct ieee80211_key_conf *hw_key; | 567 | struct ieee80211_key_conf *hw_key; |
565 | struct ieee80211_sta *sta; | 568 | /* 8 bytes free */ |
566 | } control; | 569 | } control; |
567 | struct { | 570 | struct { |
568 | struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; | 571 | struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; |
@@ -673,21 +676,41 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
673 | * @RX_FLAG_HT_GF: This frame was received in a HT-greenfield transmission, if | 676 | * @RX_FLAG_HT_GF: This frame was received in a HT-greenfield transmission, if |
674 | * the driver fills this value it should add %IEEE80211_RADIOTAP_MCS_HAVE_FMT | 677 | * the driver fills this value it should add %IEEE80211_RADIOTAP_MCS_HAVE_FMT |
675 | * to hw.radiotap_mcs_details to advertise that fact | 678 | * to hw.radiotap_mcs_details to advertise that fact |
679 | * @RX_FLAG_AMPDU_DETAILS: A-MPDU details are known, in particular the reference | ||
680 | * number (@ampdu_reference) must be populated and be a distinct number for | ||
681 | * each A-MPDU | ||
682 | * @RX_FLAG_AMPDU_REPORT_ZEROLEN: driver reports 0-length subframes | ||
683 | * @RX_FLAG_AMPDU_IS_ZEROLEN: This is a zero-length subframe, for | ||
684 | * monitoring purposes only | ||
685 | * @RX_FLAG_AMPDU_LAST_KNOWN: last subframe is known, should be set on all | ||
686 | * subframes of a single A-MPDU | ||
687 | * @RX_FLAG_AMPDU_IS_LAST: this subframe is the last subframe of the A-MPDU | ||
688 | * @RX_FLAG_AMPDU_DELIM_CRC_ERROR: A delimiter CRC error has been detected | ||
689 | * on this subframe | ||
690 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC | ||
691 | * is stored in the @ampdu_delimiter_crc field) | ||
676 | */ | 692 | */ |
677 | enum mac80211_rx_flags { | 693 | enum mac80211_rx_flags { |
678 | RX_FLAG_MMIC_ERROR = 1<<0, | 694 | RX_FLAG_MMIC_ERROR = BIT(0), |
679 | RX_FLAG_DECRYPTED = 1<<1, | 695 | RX_FLAG_DECRYPTED = BIT(1), |
680 | RX_FLAG_MMIC_STRIPPED = 1<<3, | 696 | RX_FLAG_MMIC_STRIPPED = BIT(3), |
681 | RX_FLAG_IV_STRIPPED = 1<<4, | 697 | RX_FLAG_IV_STRIPPED = BIT(4), |
682 | RX_FLAG_FAILED_FCS_CRC = 1<<5, | 698 | RX_FLAG_FAILED_FCS_CRC = BIT(5), |
683 | RX_FLAG_FAILED_PLCP_CRC = 1<<6, | 699 | RX_FLAG_FAILED_PLCP_CRC = BIT(6), |
684 | RX_FLAG_MACTIME_MPDU = 1<<7, | 700 | RX_FLAG_MACTIME_MPDU = BIT(7), |
685 | RX_FLAG_SHORTPRE = 1<<8, | 701 | RX_FLAG_SHORTPRE = BIT(8), |
686 | RX_FLAG_HT = 1<<9, | 702 | RX_FLAG_HT = BIT(9), |
687 | RX_FLAG_40MHZ = 1<<10, | 703 | RX_FLAG_40MHZ = BIT(10), |
688 | RX_FLAG_SHORT_GI = 1<<11, | 704 | RX_FLAG_SHORT_GI = BIT(11), |
689 | RX_FLAG_NO_SIGNAL_VAL = 1<<12, | 705 | RX_FLAG_NO_SIGNAL_VAL = BIT(12), |
690 | RX_FLAG_HT_GF = 1<<13, | 706 | RX_FLAG_HT_GF = BIT(13), |
707 | RX_FLAG_AMPDU_DETAILS = BIT(14), | ||
708 | RX_FLAG_AMPDU_REPORT_ZEROLEN = BIT(15), | ||
709 | RX_FLAG_AMPDU_IS_ZEROLEN = BIT(16), | ||
710 | RX_FLAG_AMPDU_LAST_KNOWN = BIT(17), | ||
711 | RX_FLAG_AMPDU_IS_LAST = BIT(18), | ||
712 | RX_FLAG_AMPDU_DELIM_CRC_ERROR = BIT(19), | ||
713 | RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20), | ||
691 | }; | 714 | }; |
692 | 715 | ||
693 | /** | 716 | /** |
@@ -711,17 +734,22 @@ enum mac80211_rx_flags { | |||
711 | * HT rates are use (RX_FLAG_HT) | 734 | * HT rates are use (RX_FLAG_HT) |
712 | * @flag: %RX_FLAG_* | 735 | * @flag: %RX_FLAG_* |
713 | * @rx_flags: internal RX flags for mac80211 | 736 | * @rx_flags: internal RX flags for mac80211 |
737 | * @ampdu_reference: A-MPDU reference number, must be a different value for | ||
738 | * each A-MPDU but the same for each subframe within one A-MPDU | ||
739 | * @ampdu_delimiter_crc: A-MPDU delimiter CRC | ||
714 | */ | 740 | */ |
715 | struct ieee80211_rx_status { | 741 | struct ieee80211_rx_status { |
716 | u64 mactime; | 742 | u64 mactime; |
717 | u32 device_timestamp; | 743 | u32 device_timestamp; |
718 | u16 flag; | 744 | u32 ampdu_reference; |
745 | u32 flag; | ||
719 | u16 freq; | 746 | u16 freq; |
720 | u8 rate_idx; | 747 | u8 rate_idx; |
721 | u8 rx_flags; | 748 | u8 rx_flags; |
722 | u8 band; | 749 | u8 band; |
723 | u8 antenna; | 750 | u8 antenna; |
724 | s8 signal; | 751 | s8 signal; |
752 | u8 ampdu_delimiter_crc; | ||
725 | }; | 753 | }; |
726 | 754 | ||
727 | /** | 755 | /** |
@@ -1074,6 +1102,16 @@ enum sta_notify_cmd { | |||
1074 | }; | 1102 | }; |
1075 | 1103 | ||
1076 | /** | 1104 | /** |
1105 | * struct ieee80211_tx_control - TX control data | ||
1106 | * | ||
1107 | * @sta: station table entry, this sta pointer may be NULL and | ||
1108 | * it is not allowed to copy the pointer, due to RCU. | ||
1109 | */ | ||
1110 | struct ieee80211_tx_control { | ||
1111 | struct ieee80211_sta *sta; | ||
1112 | }; | ||
1113 | |||
1114 | /** | ||
1077 | * enum ieee80211_hw_flags - hardware flags | 1115 | * enum ieee80211_hw_flags - hardware flags |
1078 | * | 1116 | * |
1079 | * These flags are used to indicate hardware capabilities to | 1117 | * These flags are used to indicate hardware capabilities to |
@@ -1203,6 +1241,10 @@ enum sta_notify_cmd { | |||
1203 | * queue mapping in order to use different queues (not just one per AC) | 1241 | * queue mapping in order to use different queues (not just one per AC) |
1204 | * for different virtual interfaces. See the doc section on HW queue | 1242 | * for different virtual interfaces. See the doc section on HW queue |
1205 | * control for more details. | 1243 | * control for more details. |
1244 | * | ||
1245 | * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any | ||
1246 | * P2P Interface. This will be honoured even if more than one interface | ||
1247 | * is supported. | ||
1206 | */ | 1248 | */ |
1207 | enum ieee80211_hw_flags { | 1249 | enum ieee80211_hw_flags { |
1208 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1250 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -1230,6 +1272,7 @@ enum ieee80211_hw_flags { | |||
1230 | IEEE80211_HW_AP_LINK_PS = 1<<22, | 1272 | IEEE80211_HW_AP_LINK_PS = 1<<22, |
1231 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, | 1273 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, |
1232 | IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, | 1274 | IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, |
1275 | IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, | ||
1233 | }; | 1276 | }; |
1234 | 1277 | ||
1235 | /** | 1278 | /** |
@@ -1884,10 +1927,14 @@ enum ieee80211_frame_release_type { | |||
1884 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit | 1927 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit |
1885 | * to this station changed. | 1928 | * to this station changed. |
1886 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. | 1929 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. |
1930 | * @IEEE80211_RC_SUPP_RATES_CHANGED: The supported rate set of this peer | ||
1931 | * changed (in IBSS mode) due to discovering more information about | ||
1932 | * the peer. | ||
1887 | */ | 1933 | */ |
1888 | enum ieee80211_rate_control_changed { | 1934 | enum ieee80211_rate_control_changed { |
1889 | IEEE80211_RC_BW_CHANGED = BIT(0), | 1935 | IEEE80211_RC_BW_CHANGED = BIT(0), |
1890 | IEEE80211_RC_SMPS_CHANGED = BIT(1), | 1936 | IEEE80211_RC_SMPS_CHANGED = BIT(1), |
1937 | IEEE80211_RC_SUPP_RATES_CHANGED = BIT(2), | ||
1891 | }; | 1938 | }; |
1892 | 1939 | ||
1893 | /** | 1940 | /** |
@@ -2264,7 +2311,9 @@ enum ieee80211_rate_control_changed { | |||
2264 | * The callback is optional and can (should!) sleep. | 2311 | * The callback is optional and can (should!) sleep. |
2265 | */ | 2312 | */ |
2266 | struct ieee80211_ops { | 2313 | struct ieee80211_ops { |
2267 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 2314 | void (*tx)(struct ieee80211_hw *hw, |
2315 | struct ieee80211_tx_control *control, | ||
2316 | struct sk_buff *skb); | ||
2268 | int (*start)(struct ieee80211_hw *hw); | 2317 | int (*start)(struct ieee80211_hw *hw); |
2269 | void (*stop)(struct ieee80211_hw *hw); | 2318 | void (*stop)(struct ieee80211_hw *hw); |
2270 | #ifdef CONFIG_PM | 2319 | #ifdef CONFIG_PM |
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index e1ce1048fe5f..4a045cda9c60 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
@@ -18,6 +18,7 @@ struct nf_conntrack_ecache { | |||
18 | u16 ctmask; /* bitmask of ct events to be delivered */ | 18 | u16 ctmask; /* bitmask of ct events to be delivered */ |
19 | u16 expmask; /* bitmask of expect events to be delivered */ | 19 | u16 expmask; /* bitmask of expect events to be delivered */ |
20 | u32 pid; /* netlink pid of destroyer */ | 20 | u32 pid; /* netlink pid of destroyer */ |
21 | struct timer_list timeout; | ||
21 | }; | 22 | }; |
22 | 23 | ||
23 | static inline struct nf_conntrack_ecache * | 24 | static inline struct nf_conntrack_ecache * |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index ace280d19a20..7d00583d53da 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #ifndef __NETNS_IPV4_H__ | 5 | #ifndef __NETNS_IPV4_H__ |
6 | #define __NETNS_IPV4_H__ | 6 | #define __NETNS_IPV4_H__ |
7 | 7 | ||
8 | #include <linux/uidgid.h> | ||
8 | #include <net/inet_frag.h> | 9 | #include <net/inet_frag.h> |
9 | 10 | ||
10 | struct tcpm_hash_bucket; | 11 | struct tcpm_hash_bucket; |
@@ -60,7 +61,7 @@ struct netns_ipv4 { | |||
60 | int sysctl_icmp_ratemask; | 61 | int sysctl_icmp_ratemask; |
61 | int sysctl_icmp_errors_use_inbound_ifaddr; | 62 | int sysctl_icmp_errors_use_inbound_ifaddr; |
62 | 63 | ||
63 | unsigned int sysctl_ping_group_range[2]; | 64 | kgid_t sysctl_ping_group_range[2]; |
64 | long sysctl_tcp_mem[3]; | 65 | long sysctl_tcp_mem[3]; |
65 | 66 | ||
66 | atomic_t rt_genid; | 67 | atomic_t rt_genid; |
diff --git a/include/net/netns/packet.h b/include/net/netns/packet.h index 4780b080a436..17ec2b95c062 100644 --- a/include/net/netns/packet.h +++ b/include/net/netns/packet.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #define __NETNS_PACKET_H__ | 5 | #define __NETNS_PACKET_H__ |
6 | 6 | ||
7 | #include <linux/rculist.h> | 7 | #include <linux/rculist.h> |
8 | #include <linux/spinlock.h> | 8 | #include <linux/mutex.h> |
9 | 9 | ||
10 | struct netns_packet { | 10 | struct netns_packet { |
11 | struct mutex sklist_lock; | 11 | struct mutex sklist_lock; |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 4c0766e201e3..b01d8dd9ee7c 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -106,6 +106,34 @@ struct listen_sock { | |||
106 | struct request_sock *syn_table[0]; | 106 | struct request_sock *syn_table[0]; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | /* | ||
110 | * For a TCP Fast Open listener - | ||
111 | * lock - protects the access to all the reqsk, which is co-owned by | ||
112 | * the listener and the child socket. | ||
113 | * qlen - pending TFO requests (still in TCP_SYN_RECV). | ||
114 | * max_qlen - max TFO reqs allowed before TFO is disabled. | ||
115 | * | ||
116 | * XXX (TFO) - ideally these fields can be made as part of "listen_sock" | ||
117 | * structure above. But there is some implementation difficulty due to | ||
118 | * listen_sock being part of request_sock_queue hence will be freed when | ||
119 | * a listener is stopped. But TFO related fields may continue to be | ||
120 | * accessed even after a listener is closed, until its sk_refcnt drops | ||
121 | * to 0 implying no more outstanding TFO reqs. One solution is to keep | ||
122 | * listen_opt around until sk_refcnt drops to 0. But there is some other | ||
123 | * complexity that needs to be resolved. E.g., a listener can be disabled | ||
124 | * temporarily through shutdown()->tcp_disconnect(), and re-enabled later. | ||
125 | */ | ||
126 | struct fastopen_queue { | ||
127 | struct request_sock *rskq_rst_head; /* Keep track of past TFO */ | ||
128 | struct request_sock *rskq_rst_tail; /* requests that caused RST. | ||
129 | * This is part of the defense | ||
130 | * against spoofing attack. | ||
131 | */ | ||
132 | spinlock_t lock; | ||
133 | int qlen; /* # of pending (TCP_SYN_RECV) reqs */ | ||
134 | int max_qlen; /* != 0 iff TFO is currently enabled */ | ||
135 | }; | ||
136 | |||
109 | /** struct request_sock_queue - queue of request_socks | 137 | /** struct request_sock_queue - queue of request_socks |
110 | * | 138 | * |
111 | * @rskq_accept_head - FIFO head of established children | 139 | * @rskq_accept_head - FIFO head of established children |
@@ -129,6 +157,12 @@ struct request_sock_queue { | |||
129 | u8 rskq_defer_accept; | 157 | u8 rskq_defer_accept; |
130 | /* 3 bytes hole, try to pack */ | 158 | /* 3 bytes hole, try to pack */ |
131 | struct listen_sock *listen_opt; | 159 | struct listen_sock *listen_opt; |
160 | struct fastopen_queue *fastopenq; /* This is non-NULL iff TFO has been | ||
161 | * enabled on this listener. Check | ||
162 | * max_qlen != 0 in fastopen_queue | ||
163 | * to determine if TFO is enabled | ||
164 | * right at this moment. | ||
165 | */ | ||
132 | }; | 166 | }; |
133 | 167 | ||
134 | extern int reqsk_queue_alloc(struct request_sock_queue *queue, | 168 | extern int reqsk_queue_alloc(struct request_sock_queue *queue, |
@@ -136,6 +170,8 @@ extern int reqsk_queue_alloc(struct request_sock_queue *queue, | |||
136 | 170 | ||
137 | extern void __reqsk_queue_destroy(struct request_sock_queue *queue); | 171 | extern void __reqsk_queue_destroy(struct request_sock_queue *queue); |
138 | extern void reqsk_queue_destroy(struct request_sock_queue *queue); | 172 | extern void reqsk_queue_destroy(struct request_sock_queue *queue); |
173 | extern void reqsk_fastopen_remove(struct sock *sk, | ||
174 | struct request_sock *req, bool reset); | ||
139 | 175 | ||
140 | static inline struct request_sock * | 176 | static inline struct request_sock * |
141 | reqsk_queue_yank_acceptq(struct request_sock_queue *queue) | 177 | reqsk_queue_yank_acceptq(struct request_sock_queue *queue) |
@@ -190,19 +226,6 @@ static inline struct request_sock *reqsk_queue_remove(struct request_sock_queue | |||
190 | return req; | 226 | return req; |
191 | } | 227 | } |
192 | 228 | ||
193 | static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queue, | ||
194 | struct sock *parent) | ||
195 | { | ||
196 | struct request_sock *req = reqsk_queue_remove(queue); | ||
197 | struct sock *child = req->sk; | ||
198 | |||
199 | WARN_ON(child == NULL); | ||
200 | |||
201 | sk_acceptq_removed(parent); | ||
202 | __reqsk_free(req); | ||
203 | return child; | ||
204 | } | ||
205 | |||
206 | static inline int reqsk_queue_removed(struct request_sock_queue *queue, | 229 | static inline int reqsk_queue_removed(struct request_sock_queue *queue, |
207 | struct request_sock *req) | 230 | struct request_sock *req) |
208 | { | 231 | { |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d9611e032418..4616f468d599 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -188,7 +188,8 @@ struct tcf_proto_ops { | |||
188 | 188 | ||
189 | unsigned long (*get)(struct tcf_proto*, u32 handle); | 189 | unsigned long (*get)(struct tcf_proto*, u32 handle); |
190 | void (*put)(struct tcf_proto*, unsigned long); | 190 | void (*put)(struct tcf_proto*, unsigned long); |
191 | int (*change)(struct tcf_proto*, unsigned long, | 191 | int (*change)(struct sk_buff *, |
192 | struct tcf_proto*, unsigned long, | ||
192 | u32 handle, struct nlattr **, | 193 | u32 handle, struct nlattr **, |
193 | unsigned long *); | 194 | unsigned long *); |
194 | int (*delete)(struct tcf_proto*, unsigned long); | 195 | int (*delete)(struct tcf_proto*, unsigned long); |
diff --git a/include/net/sock.h b/include/net/sock.h index 72132aef53fc..84bdaeca1314 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -606,6 +606,15 @@ static inline void sk_add_bind_node(struct sock *sk, | |||
606 | #define sk_for_each_bound(__sk, node, list) \ | 606 | #define sk_for_each_bound(__sk, node, list) \ |
607 | hlist_for_each_entry(__sk, node, list, sk_bind_node) | 607 | hlist_for_each_entry(__sk, node, list, sk_bind_node) |
608 | 608 | ||
609 | static inline struct user_namespace *sk_user_ns(struct sock *sk) | ||
610 | { | ||
611 | /* Careful only use this in a context where these parameters | ||
612 | * can not change and must all be valid, such as recvmsg from | ||
613 | * userspace. | ||
614 | */ | ||
615 | return sk->sk_socket->file->f_cred->user_ns; | ||
616 | } | ||
617 | |||
609 | /* Sock flags */ | 618 | /* Sock flags */ |
610 | enum sock_flags { | 619 | enum sock_flags { |
611 | SOCK_DEAD, | 620 | SOCK_DEAD, |
@@ -1670,7 +1679,7 @@ static inline void sock_graft(struct sock *sk, struct socket *parent) | |||
1670 | write_unlock_bh(&sk->sk_callback_lock); | 1679 | write_unlock_bh(&sk->sk_callback_lock); |
1671 | } | 1680 | } |
1672 | 1681 | ||
1673 | extern int sock_i_uid(struct sock *sk); | 1682 | extern kuid_t sock_i_uid(struct sock *sk); |
1674 | extern unsigned long sock_i_ino(struct sock *sk); | 1683 | extern unsigned long sock_i_ino(struct sock *sk); |
1675 | 1684 | ||
1676 | static inline struct dst_entry * | 1685 | static inline struct dst_entry * |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 1f000ffe7075..1421b02a7905 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -98,11 +98,21 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
98 | * 15 is ~13-30min depending on RTO. | 98 | * 15 is ~13-30min depending on RTO. |
99 | */ | 99 | */ |
100 | 100 | ||
101 | #define TCP_SYN_RETRIES 5 /* number of times to retry active opening a | 101 | #define TCP_SYN_RETRIES 6 /* This is how many retries are done |
102 | * connection: ~180sec is RFC minimum */ | 102 | * when active opening a connection. |
103 | * RFC1122 says the minimum retry MUST | ||
104 | * be at least 180secs. Nevertheless | ||
105 | * this value is corresponding to | ||
106 | * 63secs of retransmission with the | ||
107 | * current initial RTO. | ||
108 | */ | ||
103 | 109 | ||
104 | #define TCP_SYNACK_RETRIES 5 /* number of times to retry passive opening a | 110 | #define TCP_SYNACK_RETRIES 5 /* This is how may retries are done |
105 | * connection: ~180sec is RFC minimum */ | 111 | * when passive opening a connection. |
112 | * This is corresponding to 31secs of | ||
113 | * retransmission with the current | ||
114 | * initial RTO. | ||
115 | */ | ||
106 | 116 | ||
107 | #define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT | 117 | #define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT |
108 | * state, about 60 seconds */ | 118 | * state, about 60 seconds */ |
@@ -214,8 +224,24 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
214 | 224 | ||
215 | /* Bit Flags for sysctl_tcp_fastopen */ | 225 | /* Bit Flags for sysctl_tcp_fastopen */ |
216 | #define TFO_CLIENT_ENABLE 1 | 226 | #define TFO_CLIENT_ENABLE 1 |
227 | #define TFO_SERVER_ENABLE 2 | ||
217 | #define TFO_CLIENT_NO_COOKIE 4 /* Data in SYN w/o cookie option */ | 228 | #define TFO_CLIENT_NO_COOKIE 4 /* Data in SYN w/o cookie option */ |
218 | 229 | ||
230 | /* Process SYN data but skip cookie validation */ | ||
231 | #define TFO_SERVER_COOKIE_NOT_CHKED 0x100 | ||
232 | /* Accept SYN data w/o any cookie option */ | ||
233 | #define TFO_SERVER_COOKIE_NOT_REQD 0x200 | ||
234 | |||
235 | /* Force enable TFO on all listeners, i.e., not requiring the | ||
236 | * TCP_FASTOPEN socket option. SOCKOPT1/2 determine how to set max_qlen. | ||
237 | */ | ||
238 | #define TFO_SERVER_WO_SOCKOPT1 0x400 | ||
239 | #define TFO_SERVER_WO_SOCKOPT2 0x800 | ||
240 | /* Always create TFO child sockets on a TFO listener even when | ||
241 | * cookie/data not present. (For testing purpose!) | ||
242 | */ | ||
243 | #define TFO_SERVER_ALWAYS 0x1000 | ||
244 | |||
219 | extern struct inet_timewait_death_row tcp_death_row; | 245 | extern struct inet_timewait_death_row tcp_death_row; |
220 | 246 | ||
221 | /* sysctl variables for tcp */ | 247 | /* sysctl variables for tcp */ |
@@ -398,7 +424,8 @@ extern enum tcp_tw_status tcp_timewait_state_process(struct inet_timewait_sock * | |||
398 | const struct tcphdr *th); | 424 | const struct tcphdr *th); |
399 | extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb, | 425 | extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb, |
400 | struct request_sock *req, | 426 | struct request_sock *req, |
401 | struct request_sock **prev); | 427 | struct request_sock **prev, |
428 | bool fastopen); | ||
402 | extern int tcp_child_process(struct sock *parent, struct sock *child, | 429 | extern int tcp_child_process(struct sock *parent, struct sock *child, |
403 | struct sk_buff *skb); | 430 | struct sk_buff *skb); |
404 | extern bool tcp_use_frto(struct sock *sk); | 431 | extern bool tcp_use_frto(struct sock *sk); |
@@ -411,12 +438,6 @@ extern void tcp_metrics_init(void); | |||
411 | extern bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, bool paws_check); | 438 | extern bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, bool paws_check); |
412 | extern bool tcp_remember_stamp(struct sock *sk); | 439 | extern bool tcp_remember_stamp(struct sock *sk); |
413 | extern bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw); | 440 | extern bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw); |
414 | extern void tcp_fastopen_cache_get(struct sock *sk, u16 *mss, | ||
415 | struct tcp_fastopen_cookie *cookie, | ||
416 | int *syn_loss, unsigned long *last_syn_loss); | ||
417 | extern void tcp_fastopen_cache_set(struct sock *sk, u16 mss, | ||
418 | struct tcp_fastopen_cookie *cookie, | ||
419 | bool syn_lost); | ||
420 | extern void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst); | 441 | extern void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst); |
421 | extern void tcp_disable_fack(struct tcp_sock *tp); | 442 | extern void tcp_disable_fack(struct tcp_sock *tp); |
422 | extern void tcp_close(struct sock *sk, long timeout); | 443 | extern void tcp_close(struct sock *sk, long timeout); |
@@ -458,7 +479,8 @@ extern int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, | |||
458 | extern int tcp_connect(struct sock *sk); | 479 | extern int tcp_connect(struct sock *sk); |
459 | extern struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, | 480 | extern struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, |
460 | struct request_sock *req, | 481 | struct request_sock *req, |
461 | struct request_values *rvp); | 482 | struct request_values *rvp, |
483 | struct tcp_fastopen_cookie *foc); | ||
462 | extern int tcp_disconnect(struct sock *sk, int flags); | 484 | extern int tcp_disconnect(struct sock *sk, int flags); |
463 | 485 | ||
464 | void tcp_connect_init(struct sock *sk); | 486 | void tcp_connect_init(struct sock *sk); |
@@ -527,6 +549,7 @@ extern void tcp_send_delayed_ack(struct sock *sk); | |||
527 | extern void tcp_cwnd_application_limited(struct sock *sk); | 549 | extern void tcp_cwnd_application_limited(struct sock *sk); |
528 | extern void tcp_resume_early_retransmit(struct sock *sk); | 550 | extern void tcp_resume_early_retransmit(struct sock *sk); |
529 | extern void tcp_rearm_rto(struct sock *sk); | 551 | extern void tcp_rearm_rto(struct sock *sk); |
552 | extern void tcp_reset(struct sock *sk); | ||
530 | 553 | ||
531 | /* tcp_timer.c */ | 554 | /* tcp_timer.c */ |
532 | extern void tcp_init_xmit_timers(struct sock *); | 555 | extern void tcp_init_xmit_timers(struct sock *); |
@@ -576,6 +599,7 @@ extern int tcp_mtu_to_mss(struct sock *sk, int pmtu); | |||
576 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); | 599 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); |
577 | extern void tcp_mtup_init(struct sock *sk); | 600 | extern void tcp_mtup_init(struct sock *sk); |
578 | extern void tcp_valid_rtt_meas(struct sock *sk, u32 seq_rtt); | 601 | extern void tcp_valid_rtt_meas(struct sock *sk, u32 seq_rtt); |
602 | extern void tcp_init_buffer_space(struct sock *sk); | ||
579 | 603 | ||
580 | static inline void tcp_bound_rto(const struct sock *sk) | 604 | static inline void tcp_bound_rto(const struct sock *sk) |
581 | { | 605 | { |
@@ -1094,6 +1118,7 @@ static inline void tcp_openreq_init(struct request_sock *req, | |||
1094 | req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ | 1118 | req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ |
1095 | req->cookie_ts = 0; | 1119 | req->cookie_ts = 0; |
1096 | tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; | 1120 | tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; |
1121 | tcp_rsk(req)->rcv_nxt = TCP_SKB_CB(skb)->seq + 1; | ||
1097 | req->mss = rx_opt->mss_clamp; | 1122 | req->mss = rx_opt->mss_clamp; |
1098 | req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; | 1123 | req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; |
1099 | ireq->tstamp_ok = rx_opt->tstamp_ok; | 1124 | ireq->tstamp_ok = rx_opt->tstamp_ok; |
@@ -1298,15 +1323,34 @@ extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff | |||
1298 | extern int tcp_md5_hash_key(struct tcp_md5sig_pool *hp, | 1323 | extern int tcp_md5_hash_key(struct tcp_md5sig_pool *hp, |
1299 | const struct tcp_md5sig_key *key); | 1324 | const struct tcp_md5sig_key *key); |
1300 | 1325 | ||
1326 | /* From tcp_fastopen.c */ | ||
1327 | extern void tcp_fastopen_cache_get(struct sock *sk, u16 *mss, | ||
1328 | struct tcp_fastopen_cookie *cookie, | ||
1329 | int *syn_loss, unsigned long *last_syn_loss); | ||
1330 | extern void tcp_fastopen_cache_set(struct sock *sk, u16 mss, | ||
1331 | struct tcp_fastopen_cookie *cookie, | ||
1332 | bool syn_lost); | ||
1301 | struct tcp_fastopen_request { | 1333 | struct tcp_fastopen_request { |
1302 | /* Fast Open cookie. Size 0 means a cookie request */ | 1334 | /* Fast Open cookie. Size 0 means a cookie request */ |
1303 | struct tcp_fastopen_cookie cookie; | 1335 | struct tcp_fastopen_cookie cookie; |
1304 | struct msghdr *data; /* data in MSG_FASTOPEN */ | 1336 | struct msghdr *data; /* data in MSG_FASTOPEN */ |
1305 | u16 copied; /* queued in tcp_connect() */ | 1337 | u16 copied; /* queued in tcp_connect() */ |
1306 | }; | 1338 | }; |
1307 | |||
1308 | void tcp_free_fastopen_req(struct tcp_sock *tp); | 1339 | void tcp_free_fastopen_req(struct tcp_sock *tp); |
1309 | 1340 | ||
1341 | extern struct tcp_fastopen_context __rcu *tcp_fastopen_ctx; | ||
1342 | int tcp_fastopen_reset_cipher(void *key, unsigned int len); | ||
1343 | void tcp_fastopen_cookie_gen(__be32 addr, struct tcp_fastopen_cookie *foc); | ||
1344 | |||
1345 | #define TCP_FASTOPEN_KEY_LENGTH 16 | ||
1346 | |||
1347 | /* Fastopen key context */ | ||
1348 | struct tcp_fastopen_context { | ||
1349 | struct crypto_cipher __rcu *tfm; | ||
1350 | __u8 key[TCP_FASTOPEN_KEY_LENGTH]; | ||
1351 | struct rcu_head rcu; | ||
1352 | }; | ||
1353 | |||
1310 | /* write queue abstraction */ | 1354 | /* write queue abstraction */ |
1311 | static inline void tcp_write_queue_purge(struct sock *sk) | 1355 | static inline void tcp_write_queue_purge(struct sock *sk) |
1312 | { | 1356 | { |
@@ -1510,7 +1554,8 @@ struct tcp_iter_state { | |||
1510 | sa_family_t family; | 1554 | sa_family_t family; |
1511 | enum tcp_seq_states state; | 1555 | enum tcp_seq_states state; |
1512 | struct sock *syn_wait_sk; | 1556 | struct sock *syn_wait_sk; |
1513 | int bucket, offset, sbucket, num, uid; | 1557 | int bucket, offset, sbucket, num; |
1558 | kuid_t uid; | ||
1514 | loff_t last_pos; | 1559 | loff_t last_pos; |
1515 | }; | 1560 | }; |
1516 | 1561 | ||