Use preferred kernel integer type u16 instead of the POSIX u_int16_t variant. No functional change. Signed-off-by: Carlos Grillet --- net/netfilter/nf_nat_ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_nat_ftp.c b/net/netfilter/nf_nat_ftp.c index c92a436d9c48..ab714629e2b1 100644 --- a/net/netfilter/nf_nat_ftp.c +++ b/net/netfilter/nf_nat_ftp.c @@ -69,7 +69,7 @@ static unsigned int nf_nat_ftp(struct sk_buff *skb, struct nf_conntrack_expect *exp) { union nf_inet_addr newaddr; - u_int16_t port; + u16 port; int dir = CTINFO2DIR(ctinfo); struct nf_conn *ct = exp->master; char buffer[sizeof("|1||65535|") + INET6_ADDRSTRLEN]; -- 2.54.0 Replace POSIX u_int16_t with preferred kernel type u16 No functional changes. Signed-off-by: Carlos Grillet --- net/netfilter/nf_nat_irc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_nat_irc.c b/net/netfilter/nf_nat_irc.c index 19c4fcc60c50..14b79cb0171b 100644 --- a/net/netfilter/nf_nat_irc.c +++ b/net/netfilter/nf_nat_irc.c @@ -39,7 +39,7 @@ static unsigned int help(struct sk_buff *skb, char buffer[sizeof("4294967296 65635")]; struct nf_conn *ct = exp->master; union nf_inet_addr newaddr; - u_int16_t port; + u16 port; /* Reply comes from server. */ newaddr = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3; -- 2.54.0 Replace POSIX u_int8_t with preferred kernel type u8, update prototype and struct definition. No functional changes. Signed-off-by: Carlos Grillet --- include/linux/netfilter.h | 6 +++--- net/netfilter/nf_sockopt.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index efbbfa770d66..91b68bdba3f5 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -181,7 +181,7 @@ static inline void nf_hook_state_init(struct nf_hook_state *p, struct nf_sockopt_ops { struct list_head list; - u_int8_t pf; + u8 pf; /* Non-inclusive ranges: use 0/0/NULL to never get called. */ int set_optmin; @@ -357,9 +357,9 @@ NF_HOOK_LIST(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk, } /* Call setsockopt() */ -int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, sockptr_t opt, +int nf_setsockopt(struct sock *sk, u8 pf, int optval, sockptr_t opt, unsigned int len); -int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt, +int nf_getsockopt(struct sock *sk, u8 pf, int optval, char __user *opt, int *len); struct flowi; diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c index 34afcd03b6f6..19a1d028158c 100644 --- a/net/netfilter/nf_sockopt.c +++ b/net/netfilter/nf_sockopt.c @@ -59,8 +59,8 @@ void nf_unregister_sockopt(struct nf_sockopt_ops *reg) } EXPORT_SYMBOL(nf_unregister_sockopt); -static struct nf_sockopt_ops *nf_sockopt_find(struct sock *sk, u_int8_t pf, - int val, int get) +static struct nf_sockopt_ops *nf_sockopt_find(struct sock *sk, u8 pf, + int val, int get) { struct nf_sockopt_ops *ops; @@ -89,7 +89,7 @@ static struct nf_sockopt_ops *nf_sockopt_find(struct sock *sk, u_int8_t pf, return ops; } -int nf_setsockopt(struct sock *sk, u_int8_t pf, int val, sockptr_t opt, +int nf_setsockopt(struct sock *sk, u8 pf, int val, sockptr_t opt, unsigned int len) { struct nf_sockopt_ops *ops; @@ -104,7 +104,7 @@ int nf_setsockopt(struct sock *sk, u_int8_t pf, int val, sockptr_t opt, } EXPORT_SYMBOL(nf_setsockopt); -int nf_getsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt, +int nf_getsockopt(struct sock *sk, u8 pf, int val, char __user *opt, int *len) { struct nf_sockopt_ops *ops; -- 2.54.0 Replace POSIX u_int8_t/u_int16_t with preferred kernel types u8/u16 No functional changes. Signed-off-by: Carlos Grillet --- net/netfilter/xt_TCPOPTSTRIP.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netfilter/xt_TCPOPTSTRIP.c b/net/netfilter/xt_TCPOPTSTRIP.c index 93f064306901..265d21697847 100644 --- a/net/netfilter/xt_TCPOPTSTRIP.c +++ b/net/netfilter/xt_TCPOPTSTRIP.c @@ -16,7 +16,7 @@ #include #include -static inline unsigned int optlen(const u_int8_t *opt, unsigned int offset) +static inline unsigned int optlen(const u8 *opt, unsigned int offset) { /* Beware zero-length options: make finite progress */ if (opt[offset] <= TCPOPT_NOP || opt[offset+1] == 0) @@ -33,8 +33,8 @@ tcpoptstrip_mangle_packet(struct sk_buff *skb, const struct xt_tcpoptstrip_target_info *info = par->targinfo; struct tcphdr *tcph, _th; unsigned int optl, i, j; - u_int16_t n, o; - u_int8_t *opt; + u16 n, o; + u8 *opt; int tcp_hdrlen; /* This is a fragment, no TCP header is available */ @@ -97,7 +97,7 @@ tcpoptstrip_tg6(struct sk_buff *skb, const struct xt_action_param *par) { struct ipv6hdr *ipv6h = ipv6_hdr(skb); int tcphoff; - u_int8_t nexthdr; + u8 nexthdr; __be16 frag_off; nexthdr = ipv6h->nexthdr; -- 2.54.0