@@ -301,6 +301,7 @@ static struct sk_buff *cdc_mbim_tx_fixup(struct usbnet *dev, struct sk_buff *skb
return NULL;
}
+#ifdef CONFIG_INET
/* Some devices are known to send Neigbor Solicitation messages and
* require Neigbor Advertisement replies. The IPv6 core will not
* respond since IFF_NOARP is set, so we must handle them ourselves.
@@ -350,6 +351,7 @@ static void do_neigh_solicit(struct usbnet *dev, u8 *buf, u16 tci)
out:
dev_put(netdev);
}
+#endif
static bool is_neigh_solicit(u8 *buf, size_t len)
{
@@ -377,8 +379,10 @@ static struct sk_buff *cdc_mbim_process_dgram(struct usbnet *dev, u8 *buf, size_
proto = htons(ETH_P_IP);
break;
case 0x60:
+#ifdef CONFIG_INET
if (is_neigh_solicit(buf, len))
do_neigh_solicit(dev, buf, tci);
+#endif
proto = htons(ETH_P_IPV6);
break;
default:
@@ -936,8 +936,15 @@ void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
u8 *proto);
+#ifdef CONFIG_INET
int ipv6_skip_exthdr(const struct sk_buff *, int start, u8 *nexthdrp,
__be16 *frag_offp);
+#else
+static inline int ipv6_skip_exthdr(const struct sk_buff *skb, int start,
+ u8 *nexthdrp, __be16 *frag_offp) {
+ return -1;
+}
+#endif
bool ipv6_ext_hdr(u8 nexthdr);
@@ -948,8 +955,16 @@ enum {
};
/* find specified header and get offset to it */
+#ifdef CONFIG_INET
int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, int target,
unsigned short *fragoff, int *fragflg);
+#else
+static inline int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
+ int target, unsigned short *fragoff,
+ int *fragflg) {
+ return -EPROTONOSUPPORT;
+}
+#endif
int ipv6_find_tlv(const struct sk_buff *skb, int offset, int type);
@@ -352,8 +352,10 @@ static inline void rt_genid_bump_ipv4(struct net *net)
extern void (*__fib6_flush_trees)(struct net *net);
static inline void rt_genid_bump_ipv6(struct net *net)
{
+#ifdef CONFIG_INET
if (__fib6_flush_trees)
__fib6_flush_trees(net);
+#endif
}
#if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN)
@@ -17,7 +17,7 @@ obj-$(CONFIG_NETFILTER) += netfilter/
obj-$(CONFIG_INET) += ipv4/
obj-$(CONFIG_XFRM) += xfrm/
obj-$(CONFIG_UNIX) += unix/
-obj-$(CONFIG_NET) += ipv6/
+obj-$(CONFIG_INET) += ipv6/
obj-$(CONFIG_PACKET) += packet/
obj-$(CONFIG_NET_KEY) += key/
obj-$(CONFIG_BRIDGE) += bridge/
ipv6 directory was being built based on CONFIG_NET not CONFIG_INET. Signed-off-by: Tom Herbert <tom@herbertland.com> --- drivers/net/usb/cdc_mbim.c | 4 ++++ include/net/ipv6.h | 15 +++++++++++++++ include/net/net_namespace.h | 2 ++ net/Makefile | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-)