summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwumu.zsl <wumu.zsl@alibaba-inc.com>2025-01-23 03:24:43 +0000
committerwumu.zsl <wumu.zsl@alibaba-inc.com>2025-01-23 03:25:02 +0000
commite766b68a189acfe12e909c39e8687d660a36849f (patch)
tree36253392db9f6c3ea586e79752671241807d0600
parent0ef6003167473a54bdb6db1ccf29c95babb17752 (diff)
bfdd: Fix CI build issue on kernel with no IPV6_HDRINCL
Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
-rw-r--r--bfdd/bfd_packet.c6
-rw-r--r--lib/bfd.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c
index 379e35c0f4..cecced3ccc 100644
--- a/bfdd/bfd_packet.c
+++ b/bfdd/bfd_packet.c
@@ -2107,16 +2107,18 @@ int bp_peer_srh_socketv6(struct bfd_session *bs)
close(sd);
return -1;
}
-#if defined(HAVE_IPV6_HDRINCL)
+#ifdef IPV6_HDRINCL
int on = 1;
/*manage the IP6 header all on own onwn*/
if (setsockopt(sd, IPPROTO_IPV6, IPV6_HDRINCL, &on, sizeof(on))) {
+#else
+ if (true) {
+#endif
zlog_err("setsockopt IPV6_HDRINCL error: %s", strerror(errno));
close(sd);
return -1;
}
-#endif
return sd;
}
diff --git a/lib/bfd.c b/lib/bfd.c
index f7ae57e8e4..6300f6f5c0 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -374,7 +374,6 @@ int zclient_bfd_command(struct zclient *zc, struct bfd_session_arg *args)
stream_putc(s, args->profilelen);
if (args->profilelen)
stream_put(s, args->profile, args->profilelen);
-
#else /* PTM BFD */
/* Encode timers if this is a registration message. */
if (args->command != ZEBRA_BFD_DEST_DEREGISTER) {
@@ -752,7 +751,6 @@ void bfd_sess_install(struct bfd_session_params *bsp)
event_add_event(bsglobal.tm, _bfd_sess_send, bsp, 0, &bsp->installev);
}
-
void bfd_sess_uninstall(struct bfd_session_params *bsp)
{
bsp->lastev = BSE_UNINSTALL;