drivers/net/wireguard/device.c:208: undefined reference to `icmpv6_ndo_send'
From: kbuild test robot
Date: Sat Feb 22 2020 - 19:53:44 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0a115e5f23b948be369faf14d3bccab283830f56
commit: a12d7f3cbdc72c7625881c8dc2660fc2c979fdf2 wireguard: device: use icmp_ndo_send helper
date: 9 days ago
config: sparc64-randconfig-a001-20200223 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.5.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 a12d7f3cbdc72c7625881c8dc2660fc2c979fdf2
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
drivers/net/wireguard/device.o: In function `wg_xmit':
>> drivers/net/wireguard/device.c:208: undefined reference to `icmpv6_ndo_send'
vim +208 drivers/net/wireguard/device.c
114
115 static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
116 {
117 struct wg_device *wg = netdev_priv(dev);
118 struct sk_buff_head packets;
119 struct wg_peer *peer;
120 struct sk_buff *next;
121 sa_family_t family;
122 u32 mtu;
123 int ret;
124
125 if (unlikely(wg_skb_examine_untrusted_ip_hdr(skb) != skb->protocol)) {
126 ret = -EPROTONOSUPPORT;
127 net_dbg_ratelimited("%s: Invalid IP packet\n", dev->name);
128 goto err;
129 }
130
131 peer = wg_allowedips_lookup_dst(&wg->peer_allowedips, skb);
132 if (unlikely(!peer)) {
133 ret = -ENOKEY;
134 if (skb->protocol == htons(ETH_P_IP))
135 net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI4\n",
136 dev->name, &ip_hdr(skb)->daddr);
137 else if (skb->protocol == htons(ETH_P_IPV6))
138 net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI6\n",
139 dev->name, &ipv6_hdr(skb)->daddr);
140 goto err;
141 }
142
143 family = READ_ONCE(peer->endpoint.addr.sa_family);
144 if (unlikely(family != AF_INET && family != AF_INET6)) {
145 ret = -EDESTADDRREQ;
146 net_dbg_ratelimited("%s: No valid endpoint has been configured or discovered for peer %llu\n",
147 dev->name, peer->internal_id);
148 goto err_peer;
149 }
150
151 mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
152
153 __skb_queue_head_init(&packets);
154 if (!skb_is_gso(skb)) {
155 skb_mark_not_on_list(skb);
156 } else {
157 struct sk_buff *segs = skb_gso_segment(skb, 0);
158
159 if (unlikely(IS_ERR(segs))) {
160 ret = PTR_ERR(segs);
161 goto err_peer;
162 }
163 dev_kfree_skb(skb);
164 skb = segs;
165 }
166
167 skb_list_walk_safe(skb, skb, next) {
168 skb_mark_not_on_list(skb);
169
170 skb = skb_share_check(skb, GFP_ATOMIC);
171 if (unlikely(!skb))
172 continue;
173
174 /* We only need to keep the original dst around for icmp,
175 * so at this point we're in a position to drop it.
176 */
177 skb_dst_drop(skb);
178
179 PACKET_CB(skb)->mtu = mtu;
180
181 __skb_queue_tail(&packets, skb);
182 }
183
184 spin_lock_bh(&peer->staged_packet_queue.lock);
185 /* If the queue is getting too big, we start removing the oldest packets
186 * until it's small again. We do this before adding the new packet, so
187 * we don't remove GSO segments that are in excess.
188 */
189 while (skb_queue_len(&peer->staged_packet_queue) > MAX_STAGED_PACKETS) {
190 dev_kfree_skb(__skb_dequeue(&peer->staged_packet_queue));
191 ++dev->stats.tx_dropped;
192 }
193 skb_queue_splice_tail(&packets, &peer->staged_packet_queue);
194 spin_unlock_bh(&peer->staged_packet_queue.lock);
195
196 wg_packet_send_staged_packets(peer);
197
198 wg_peer_put(peer);
199 return NETDEV_TX_OK;
200
201 err_peer:
202 wg_peer_put(peer);
203 err:
204 ++dev->stats.tx_errors;
205 if (skb->protocol == htons(ETH_P_IP))
206 icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
207 else if (skb->protocol == htons(ETH_P_IPV6))
> 208 icmpv6_ndo_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0);
209 kfree_skb(skb);
210 return ret;
211 }
212
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip