diff options
author | luigi <luigi@FreeBSD.org> | 2014-02-19 08:15:09 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2014-02-19 08:15:09 +0000 |
commit | 690ab44de324d5cd9aee67eed6f81effd837b070 (patch) | |
tree | 563ec4f2a378d9446ceae3ae319b8e87720028a4 /sys/dev/netmap/netmap_freebsd.c | |
parent | a406a87adef0238833c1dbf6eec0de2ac7b83d73 (diff) | |
download | FreeBSD-src-690ab44de324d5cd9aee67eed6f81effd837b070.zip FreeBSD-src-690ab44de324d5cd9aee67eed6f81effd837b070.tar.gz |
allow building without INET
Diffstat (limited to 'sys/dev/netmap/netmap_freebsd.c')
-rw-r--r-- | sys/dev/netmap/netmap_freebsd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index a8e287c..6572ca1 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -101,6 +101,7 @@ uint16_t nm_csum_ipv4(struct nm_iphdr *iph) void nm_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data, size_t datalen, uint16_t *check) { +#ifdef INET uint16_t pseudolen = datalen + iph->protocol; /* Compute and insert the pseudo-header cheksum. */ @@ -110,6 +111,13 @@ void nm_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data, * (includes the pseudo-header). */ *check = nm_csum_fold(nm_csum_raw(data, datalen, 0)); +#else + static int notsupported = 0; + if (!notsupported) { + notsupported = 1; + D("inet4 segmentation not supported"); + } +#endif } void nm_csum_tcpudp_ipv6(struct nm_ipv6hdr *ip6h, void *data, |