diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/af_rxrpc.h | 16 | ||||
| -rw-r--r-- | include/net/ax25.h | 12 | ||||
| -rw-r--r-- | include/net/inetpeer.h | 1 | ||||
| -rw-r--r-- | include/net/ip_fib.h | 2 | ||||
| -rw-r--r-- | include/net/l3mdev.h | 3 | ||||
| -rw-r--r-- | include/net/netfilter/nf_flow_table.h | 1 | ||||
| -rw-r--r-- | include/net/netfilter/nf_tables.h | 17 | ||||
| -rw-r--r-- | include/net/phonet/pep.h | 5 | ||||
| -rw-r--r-- | include/net/sock.h | 2 | ||||
| -rw-r--r-- | include/net/tls.h | 2 | ||||
| -rw-r--r-- | include/net/xfrm.h | 12 |
11 files changed, 44 insertions, 29 deletions
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h index 1adefe42c0a6..2bfb87eb98ce 100644 --- a/include/net/af_rxrpc.h +++ b/include/net/af_rxrpc.h | |||
| @@ -21,18 +21,6 @@ struct socket; | |||
| 21 | struct rxrpc_call; | 21 | struct rxrpc_call; |
| 22 | 22 | ||
| 23 | /* | 23 | /* |
| 24 | * Call completion condition (state == RXRPC_CALL_COMPLETE). | ||
| 25 | */ | ||
| 26 | enum rxrpc_call_completion { | ||
| 27 | RXRPC_CALL_SUCCEEDED, /* - Normal termination */ | ||
| 28 | RXRPC_CALL_REMOTELY_ABORTED, /* - call aborted by peer */ | ||
| 29 | RXRPC_CALL_LOCALLY_ABORTED, /* - call aborted locally on error or close */ | ||
| 30 | RXRPC_CALL_LOCAL_ERROR, /* - call failed due to local error */ | ||
| 31 | RXRPC_CALL_NETWORK_ERROR, /* - call terminated by network error */ | ||
| 32 | NR__RXRPC_CALL_COMPLETIONS | ||
| 33 | }; | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Debug ID counter for tracing. | 24 | * Debug ID counter for tracing. |
| 37 | */ | 25 | */ |
| 38 | extern atomic_t rxrpc_debug_id; | 26 | extern atomic_t rxrpc_debug_id; |
| @@ -73,10 +61,6 @@ int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t, | |||
| 73 | rxrpc_user_attach_call_t, unsigned long, gfp_t, | 61 | rxrpc_user_attach_call_t, unsigned long, gfp_t, |
| 74 | unsigned int); | 62 | unsigned int); |
| 75 | void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64); | 63 | void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64); |
| 76 | int rxrpc_kernel_retry_call(struct socket *, struct rxrpc_call *, | ||
| 77 | struct sockaddr_rxrpc *, struct key *); | ||
| 78 | int rxrpc_kernel_check_call(struct socket *, struct rxrpc_call *, | ||
| 79 | enum rxrpc_call_completion *, u32 *); | ||
| 80 | u32 rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *); | 64 | u32 rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *); |
| 81 | void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *); | 65 | void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *); |
| 82 | u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *); | 66 | u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *); |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 3f9aea8087e3..8b7eb46ad72d 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
| @@ -201,6 +201,18 @@ static inline void ax25_hold_route(ax25_route *ax25_rt) | |||
| 201 | 201 | ||
| 202 | void __ax25_put_route(ax25_route *ax25_rt); | 202 | void __ax25_put_route(ax25_route *ax25_rt); |
| 203 | 203 | ||
| 204 | extern rwlock_t ax25_route_lock; | ||
| 205 | |||
| 206 | static inline void ax25_route_lock_use(void) | ||
| 207 | { | ||
| 208 | read_lock(&ax25_route_lock); | ||
| 209 | } | ||
| 210 | |||
| 211 | static inline void ax25_route_lock_unuse(void) | ||
| 212 | { | ||
| 213 | read_unlock(&ax25_route_lock); | ||
| 214 | } | ||
| 215 | |||
| 204 | static inline void ax25_put_route(ax25_route *ax25_rt) | 216 | static inline void ax25_put_route(ax25_route *ax25_rt) |
| 205 | { | 217 | { |
| 206 | if (refcount_dec_and_test(&ax25_rt->refcount)) | 218 | if (refcount_dec_and_test(&ax25_rt->refcount)) |
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 00b5e7825508..74ff688568a0 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
| @@ -39,6 +39,7 @@ struct inet_peer { | |||
| 39 | 39 | ||
| 40 | u32 metrics[RTAX_MAX]; | 40 | u32 metrics[RTAX_MAX]; |
| 41 | u32 rate_tokens; /* rate limiting for ICMP */ | 41 | u32 rate_tokens; /* rate limiting for ICMP */ |
| 42 | u32 n_redirects; | ||
| 42 | unsigned long rate_last; | 43 | unsigned long rate_last; |
| 43 | /* | 44 | /* |
| 44 | * Once inet_peer is queued for deletion (refcnt == 0), following field | 45 | * Once inet_peer is queued for deletion (refcnt == 0), following field |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index c5969762a8f4..9c8214d2116d 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
| @@ -241,7 +241,7 @@ int fib_table_delete(struct net *, struct fib_table *, struct fib_config *, | |||
| 241 | struct netlink_ext_ack *extack); | 241 | struct netlink_ext_ack *extack); |
| 242 | int fib_table_dump(struct fib_table *table, struct sk_buff *skb, | 242 | int fib_table_dump(struct fib_table *table, struct sk_buff *skb, |
| 243 | struct netlink_callback *cb, struct fib_dump_filter *filter); | 243 | struct netlink_callback *cb, struct fib_dump_filter *filter); |
| 244 | int fib_table_flush(struct net *net, struct fib_table *table); | 244 | int fib_table_flush(struct net *net, struct fib_table *table, bool flush_all); |
| 245 | struct fib_table *fib_trie_unmerge(struct fib_table *main_tb); | 245 | struct fib_table *fib_trie_unmerge(struct fib_table *main_tb); |
| 246 | void fib_table_flush_external(struct fib_table *table); | 246 | void fib_table_flush_external(struct fib_table *table); |
| 247 | void fib_free_table(struct fib_table *tb); | 247 | void fib_free_table(struct fib_table *tb); |
diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h index 78fa0ac4613c..5175fd63cd82 100644 --- a/include/net/l3mdev.h +++ b/include/net/l3mdev.h | |||
| @@ -153,7 +153,8 @@ struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto) | |||
| 153 | 153 | ||
| 154 | if (netif_is_l3_slave(skb->dev)) | 154 | if (netif_is_l3_slave(skb->dev)) |
| 155 | master = netdev_master_upper_dev_get_rcu(skb->dev); | 155 | master = netdev_master_upper_dev_get_rcu(skb->dev); |
| 156 | else if (netif_is_l3_master(skb->dev)) | 156 | else if (netif_is_l3_master(skb->dev) || |
| 157 | netif_has_l3_rx_handler(skb->dev)) | ||
| 157 | master = skb->dev; | 158 | master = skb->dev; |
| 158 | 159 | ||
| 159 | if (master && master->l3mdev_ops->l3mdev_l3_rcv) | 160 | if (master && master->l3mdev_ops->l3mdev_l3_rcv) |
diff --git a/include/net/netfilter/nf_flow_table.h b/include/net/netfilter/nf_flow_table.h index 7d5cda7ce32a..3e370cb36263 100644 --- a/include/net/netfilter/nf_flow_table.h +++ b/include/net/netfilter/nf_flow_table.h | |||
| @@ -84,7 +84,6 @@ struct flow_offload { | |||
| 84 | struct nf_flow_route { | 84 | struct nf_flow_route { |
| 85 | struct { | 85 | struct { |
| 86 | struct dst_entry *dst; | 86 | struct dst_entry *dst; |
| 87 | int ifindex; | ||
| 88 | } tuple[FLOW_OFFLOAD_DIR_MAX]; | 87 | } tuple[FLOW_OFFLOAD_DIR_MAX]; |
| 89 | }; | 88 | }; |
| 90 | 89 | ||
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 841835a387e1..b4984bbbe157 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
| @@ -469,9 +469,7 @@ struct nft_set_binding { | |||
| 469 | int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set, | 469 | int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set, |
| 470 | struct nft_set_binding *binding); | 470 | struct nft_set_binding *binding); |
| 471 | void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, | 471 | void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, |
| 472 | struct nft_set_binding *binding); | 472 | struct nft_set_binding *binding, bool commit); |
| 473 | void nf_tables_rebind_set(const struct nft_ctx *ctx, struct nft_set *set, | ||
| 474 | struct nft_set_binding *binding); | ||
| 475 | void nf_tables_destroy_set(const struct nft_ctx *ctx, struct nft_set *set); | 473 | void nf_tables_destroy_set(const struct nft_ctx *ctx, struct nft_set *set); |
| 476 | 474 | ||
| 477 | /** | 475 | /** |
| @@ -721,6 +719,13 @@ struct nft_expr_type { | |||
| 721 | #define NFT_EXPR_STATEFUL 0x1 | 719 | #define NFT_EXPR_STATEFUL 0x1 |
| 722 | #define NFT_EXPR_GC 0x2 | 720 | #define NFT_EXPR_GC 0x2 |
| 723 | 721 | ||
| 722 | enum nft_trans_phase { | ||
| 723 | NFT_TRANS_PREPARE, | ||
| 724 | NFT_TRANS_ABORT, | ||
| 725 | NFT_TRANS_COMMIT, | ||
| 726 | NFT_TRANS_RELEASE | ||
| 727 | }; | ||
| 728 | |||
| 724 | /** | 729 | /** |
| 725 | * struct nft_expr_ops - nf_tables expression operations | 730 | * struct nft_expr_ops - nf_tables expression operations |
| 726 | * | 731 | * |
| @@ -750,7 +755,8 @@ struct nft_expr_ops { | |||
| 750 | void (*activate)(const struct nft_ctx *ctx, | 755 | void (*activate)(const struct nft_ctx *ctx, |
| 751 | const struct nft_expr *expr); | 756 | const struct nft_expr *expr); |
| 752 | void (*deactivate)(const struct nft_ctx *ctx, | 757 | void (*deactivate)(const struct nft_ctx *ctx, |
| 753 | const struct nft_expr *expr); | 758 | const struct nft_expr *expr, |
| 759 | enum nft_trans_phase phase); | ||
| 754 | void (*destroy)(const struct nft_ctx *ctx, | 760 | void (*destroy)(const struct nft_ctx *ctx, |
| 755 | const struct nft_expr *expr); | 761 | const struct nft_expr *expr); |
| 756 | void (*destroy_clone)(const struct nft_ctx *ctx, | 762 | void (*destroy_clone)(const struct nft_ctx *ctx, |
| @@ -1323,12 +1329,15 @@ struct nft_trans_rule { | |||
| 1323 | struct nft_trans_set { | 1329 | struct nft_trans_set { |
| 1324 | struct nft_set *set; | 1330 | struct nft_set *set; |
| 1325 | u32 set_id; | 1331 | u32 set_id; |
| 1332 | bool bound; | ||
| 1326 | }; | 1333 | }; |
| 1327 | 1334 | ||
| 1328 | #define nft_trans_set(trans) \ | 1335 | #define nft_trans_set(trans) \ |
| 1329 | (((struct nft_trans_set *)trans->data)->set) | 1336 | (((struct nft_trans_set *)trans->data)->set) |
| 1330 | #define nft_trans_set_id(trans) \ | 1337 | #define nft_trans_set_id(trans) \ |
| 1331 | (((struct nft_trans_set *)trans->data)->set_id) | 1338 | (((struct nft_trans_set *)trans->data)->set_id) |
| 1339 | #define nft_trans_set_bound(trans) \ | ||
| 1340 | (((struct nft_trans_set *)trans->data)->bound) | ||
| 1332 | 1341 | ||
| 1333 | struct nft_trans_chain { | 1342 | struct nft_trans_chain { |
| 1334 | bool update; | 1343 | bool update; |
diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h index b669fe6dbc3b..98f31c7ea23d 100644 --- a/include/net/phonet/pep.h +++ b/include/net/phonet/pep.h | |||
| @@ -63,10 +63,11 @@ struct pnpipehdr { | |||
| 63 | u8 state_after_reset; /* reset request */ | 63 | u8 state_after_reset; /* reset request */ |
| 64 | u8 error_code; /* any response */ | 64 | u8 error_code; /* any response */ |
| 65 | u8 pep_type; /* status indication */ | 65 | u8 pep_type; /* status indication */ |
| 66 | u8 data[1]; | 66 | u8 data0; /* anything else */ |
| 67 | }; | 67 | }; |
| 68 | u8 data[]; | ||
| 68 | }; | 69 | }; |
| 69 | #define other_pep_type data[1] | 70 | #define other_pep_type data[0] |
| 70 | 71 | ||
| 71 | static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb) | 72 | static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb) |
| 72 | { | 73 | { |
diff --git a/include/net/sock.h b/include/net/sock.h index 2b229f7be8eb..f43f935cb113 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1277,7 +1277,7 @@ static inline void sk_sockets_allocated_inc(struct sock *sk) | |||
| 1277 | percpu_counter_inc(sk->sk_prot->sockets_allocated); | 1277 | percpu_counter_inc(sk->sk_prot->sockets_allocated); |
| 1278 | } | 1278 | } |
| 1279 | 1279 | ||
| 1280 | static inline int | 1280 | static inline u64 |
| 1281 | sk_sockets_allocated_read_positive(struct sock *sk) | 1281 | sk_sockets_allocated_read_positive(struct sock *sk) |
| 1282 | { | 1282 | { |
| 1283 | return percpu_counter_read_positive(sk->sk_prot->sockets_allocated); | 1283 | return percpu_counter_read_positive(sk->sk_prot->sockets_allocated); |
diff --git a/include/net/tls.h b/include/net/tls.h index 2a6ac8d642af..1486b60c4de8 100644 --- a/include/net/tls.h +++ b/include/net/tls.h | |||
| @@ -120,6 +120,8 @@ struct tls_rec { | |||
| 120 | struct scatterlist sg_aead_out[2]; | 120 | struct scatterlist sg_aead_out[2]; |
| 121 | 121 | ||
| 122 | char aad_space[TLS_AAD_SPACE_SIZE]; | 122 | char aad_space[TLS_AAD_SPACE_SIZE]; |
| 123 | u8 iv_data[TLS_CIPHER_AES_GCM_128_IV_SIZE + | ||
| 124 | TLS_CIPHER_AES_GCM_128_SALT_SIZE]; | ||
| 123 | struct aead_request aead_req; | 125 | struct aead_request aead_req; |
| 124 | u8 aead_req_ctx[]; | 126 | u8 aead_req_ctx[]; |
| 125 | }; | 127 | }; |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 7298a53b9702..85386becbaea 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -853,7 +853,7 @@ static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | |||
| 853 | xfrm_pol_put(pols[i]); | 853 | xfrm_pol_put(pols[i]); |
| 854 | } | 854 | } |
| 855 | 855 | ||
| 856 | void __xfrm_state_destroy(struct xfrm_state *); | 856 | void __xfrm_state_destroy(struct xfrm_state *, bool); |
| 857 | 857 | ||
| 858 | static inline void __xfrm_state_put(struct xfrm_state *x) | 858 | static inline void __xfrm_state_put(struct xfrm_state *x) |
| 859 | { | 859 | { |
| @@ -863,7 +863,13 @@ static inline void __xfrm_state_put(struct xfrm_state *x) | |||
| 863 | static inline void xfrm_state_put(struct xfrm_state *x) | 863 | static inline void xfrm_state_put(struct xfrm_state *x) |
| 864 | { | 864 | { |
| 865 | if (refcount_dec_and_test(&x->refcnt)) | 865 | if (refcount_dec_and_test(&x->refcnt)) |
| 866 | __xfrm_state_destroy(x); | 866 | __xfrm_state_destroy(x, false); |
| 867 | } | ||
| 868 | |||
| 869 | static inline void xfrm_state_put_sync(struct xfrm_state *x) | ||
| 870 | { | ||
| 871 | if (refcount_dec_and_test(&x->refcnt)) | ||
| 872 | __xfrm_state_destroy(x, true); | ||
| 867 | } | 873 | } |
| 868 | 874 | ||
| 869 | static inline void xfrm_state_hold(struct xfrm_state *x) | 875 | static inline void xfrm_state_hold(struct xfrm_state *x) |
| @@ -1590,7 +1596,7 @@ struct xfrmk_spdinfo { | |||
| 1590 | 1596 | ||
| 1591 | struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 mark, u32 seq); | 1597 | struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 mark, u32 seq); |
| 1592 | int xfrm_state_delete(struct xfrm_state *x); | 1598 | int xfrm_state_delete(struct xfrm_state *x); |
| 1593 | int xfrm_state_flush(struct net *net, u8 proto, bool task_valid); | 1599 | int xfrm_state_flush(struct net *net, u8 proto, bool task_valid, bool sync); |
| 1594 | int xfrm_dev_state_flush(struct net *net, struct net_device *dev, bool task_valid); | 1600 | int xfrm_dev_state_flush(struct net *net, struct net_device *dev, bool task_valid); |
| 1595 | void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si); | 1601 | void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si); |
| 1596 | void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); | 1602 | void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); |
