Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Define carp6_cksum only when it is used, that is...



details:   https://anonhg.NetBSD.org/src/rev/ae6c0adc5aad
branches:  trunk
changeset: 451745:ae6c0adc5aad
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jun 01 19:13:41 2019 +0000

description:
Define carp6_cksum only when it is used, that is under INET6

diffstat:

 sys/netinet/ip_carp.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r f807a49ba2f5 -r ae6c0adc5aad sys/netinet/ip_carp.c
--- a/sys/netinet/ip_carp.c     Sat Jun 01 17:24:20 2019 +0000
+++ b/sys/netinet/ip_carp.c     Sat Jun 01 19:13:41 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_carp.c,v 1.102 2019/03/14 07:05:07 ozaki-r Exp $    */
+/*     $NetBSD: ip_carp.c,v 1.103 2019/06/01 19:13:41 joerg Exp $      */
 /*     $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $   */
 
 /*
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.102 2019/03/14 07:05:07 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.103 2019/06/01 19:13:41 joerg Exp $");
 
 /*
  * TODO:
@@ -253,11 +253,13 @@
        return (in_cksum(m, len));
 }
 
+#ifdef INET6
 static __inline u_int16_t
 carp6_cksum(struct mbuf *m, uint32_t off, uint32_t len)
 {
        return (in6_cksum(m, IPPROTO_CARP, off, len));
 }
+#endif
 
 static void
 carp_hmac_prepare(struct carp_softc *sc)



Home | Main Index | Thread Index | Old Index