aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2021-06-06 14:03:06 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2021-06-06 14:03:06 +0000
commita3c2c06bc938dbb9ad2ec4a352194159e29b9146 (patch)
tree24a78f8a48a26077acb9cd440dd8157610cde0ee
parent82e38486548c70b9e7fc4323376aab85f5cc026c (diff)
Make LINT NOINET and NOIP kernel builds warning free.
Apply #ifdef INET or #if defined(INET6) || defined(INET) to make universe NOINET and NOIP LINT kernels warning free as well again.
-rw-r--r--sys/net/if_vxlan.c2
-rw-r--r--sys/net/rtsock.c4
-rw-r--r--sys/netgraph/netflow/netflow.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index f56ec23540a7..b03357c30c08 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -2429,6 +2429,7 @@ vxlan_encap_header(struct vxlan_softc *sc, struct mbuf *m, int ipoff,
}
#endif
+#if defined(INET6) || defined(INET)
/*
* Return the CSUM_INNER_* equivalent of CSUM_* caps.
*/
@@ -2470,6 +2471,7 @@ csum_flags_to_inner_flags(uint32_t csum_flags_in, const uint32_t encap)
return (csum_flags);
}
+#endif
static int
vxlan_encap4(struct vxlan_softc *sc, const union vxlan_sockaddr *fvxlsa,
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 3cb645f42e4c..07a2deaa5518 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1007,6 +1007,7 @@ save_add_notification(struct rib_cmd_info *rc, void *_cbdata)
}
#endif
+#if defined(INET6) || defined(INET)
static struct sockaddr *
alloc_sockaddr_aligned(struct linear_buffer *lb, int len)
{
@@ -1017,6 +1018,7 @@ alloc_sockaddr_aligned(struct linear_buffer *lb, int len)
lb->offset += len;
return (sa);
}
+#endif
/*ARGSUSED*/
static int
@@ -1358,6 +1360,7 @@ fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr *addr6,
}
#endif
+#if defined(INET6) || defined(INET)
/*
* Checks if gateway is suitable for lltable operations.
* Lltable code requires AF_LINK gateway with ifindex
@@ -1448,6 +1451,7 @@ cleanup_xaddrs_gateway(struct rt_addrinfo *info, struct linear_buffer *lb)
return (0);
}
+#endif
static void
remove_netmask(struct rt_addrinfo *info)
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
index f7f0648b296f..7d4108ee59a7 100644
--- a/sys/netgraph/netflow/netflow.c
+++ b/sys/netgraph/netflow/netflow.c
@@ -117,6 +117,7 @@ static int hash6_insert(priv_p, struct flow_hash_entry *, struct flow6_rec *,
static void expire_flow(priv_p, fib_export_p, struct flow_entry *, int);
+#ifdef INET
/*
* Generate hash for a given flow record.
*
@@ -140,6 +141,7 @@ ip_hash(struct flow_rec *r)
return ADDR_HASH(r->r_src.s_addr, r->r_dst.s_addr);
}
}
+#endif
#ifdef INET6
/* Generate hash for a given flow6 record. Use lower 4 octets from v6 addresses */