tree: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git for-net-next head: 680cba277b9779591e673100f6896e5baed7a180 commit: 3b97b1d0324f30d7edbd54d5f13a8f10469e6498 [35/40] netfilter: remove route indirection in struct nf_afinfo config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 3b97b1d0324f30d7edbd54d5f13a8f10469e6498 # save the attached .config to linux build tree make.cross ARCH=xtensa All errors (new ones prefixed by >>): In file included from net/ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:39:8: error: unknown type name 'inline__sum16' static inline__sum16 nf_ip6_checksum_partial(struct sk_buff *skb, ^~~~~~~~~~~~~ net/ipv6/netfilter.c:82:6: error: redefinition of 'nf_ip6_saveroute' void nf_ip6_saveroute(const struct sk_buff *skb, struct nf_queue_entry *entry) ^~~~~~~~~~~~~~~~ In file included from net/ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:52:20: note: previous definition of 'nf_ip6_saveroute' was here static inline void nf_ip6_saveroute(const struct sk_buff *skb, ^~~~~~~~~~~~~~~~ >> net/ipv6/netfilter.c:111:5: error: redefinition of 'nf_ip6_route' int nf_ip6_route(struct net *net, struct dst_entry **dst, struct flowi *fl, ^~~~~~~~~~~~ In file included from net/ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:47:19: note: previous definition of 'nf_ip6_route' was here static inline int nf_ip6_route(struct net *net, struct dst_entry **dst, ^~~~~~~~~~~~ net/ipv6/netfilter.c:134:9: error: redefinition of 'nf_ip6_checksum' __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, ^~~~~~~~~~~~~~~ In file included from net/ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:34:23: note: previous definition of 'nf_ip6_checksum' was here static inline __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, ^~~~~~~~~~~~~~~ net/ipv6/netfilter.c:167:9: error: conflicting types for 'nf_ip6_checksum_partial' __sum16 nf_ip6_checksum_partial(struct sk_buff *skb, unsigned int hook, ^~~~~~~~~~~~~~~~~~~~~~~ In file included from net/ipv6/netfilter.c:11:0: include/linux/netfilter_ipv6.h:39:22: note: previous definition of 'nf_ip6_checksum_partial' was here static inline__sum16 nf_ip6_checksum_partial(struct sk_buff *skb, ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/netfilter_ipv6.h:39:22: warning: 'nf_ip6_checksum_partial' defined but not used [-Wunused-function] vim +/nf_ip6_route +111 net/ipv6/netfilter.c 81 > 82 void nf_ip6_saveroute(const struct sk_buff *skb, struct nf_queue_entry *entry) 83 { 84 struct ip6_rt_info *rt_info = nf_queue_entry_reroute(entry); 85 86 if (entry->state.hook == NF_INET_LOCAL_OUT) { 87 const struct ipv6hdr *iph = ipv6_hdr(skb); 88 89 rt_info->daddr = iph->daddr; 90 rt_info->saddr = iph->saddr; 91 rt_info->mark = skb->mark; 92 } 93 } 94 EXPORT_SYMBOL_GPL(nf_ip6_saveroute); 95 96 static int nf_ip6_reroute(struct net *net, struct sk_buff *skb, 97 const struct nf_queue_entry *entry) 98 { 99 struct ip6_rt_info *rt_info = nf_queue_entry_reroute(entry); 100 101 if (entry->state.hook == NF_INET_LOCAL_OUT) { 102 const struct ipv6hdr *iph = ipv6_hdr(skb); 103 if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || 104 !ipv6_addr_equal(&iph->saddr, &rt_info->saddr) || 105 skb->mark != rt_info->mark) 106 return ip6_route_me_harder(net, skb); 107 } 108 return 0; 109 } 110 > 111 int nf_ip6_route(struct net *net, struct dst_entry **dst, struct flowi *fl, 112 bool strict) 113 { 114 static const struct ipv6_pinfo fake_pinfo; 115 static const struct inet_sock fake_sk = { 116 /* makes ip6_route_output set RT6_LOOKUP_F_IFACE: */ 117 .sk.sk_bound_dev_if = 1, 118 .pinet6 = (struct ipv6_pinfo *) &fake_pinfo, 119 }; 120 const void *sk = strict ? &fake_sk : NULL; 121 struct dst_entry *result; 122 int err; 123 124 result = ip6_route_output(net, sk, &fl->u.ip6); 125 err = result->error; 126 if (err) 127 dst_release(result); 128 else 129 *dst = result; 130 return err; 131 } 132 EXPORT_SYMBOL_GPL(nf_ip6_route); 133 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip