mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
bfdd: Fix CI build issue on kernel with no IPV6_HDRINCL
Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
This commit is contained in:
parent
0ef6003167
commit
e766b68a18
|
@ -2107,16 +2107,18 @@ int bp_peer_srh_socketv6(struct bfd_session *bs)
|
||||||
close(sd);
|
close(sd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#if defined(HAVE_IPV6_HDRINCL)
|
#ifdef IPV6_HDRINCL
|
||||||
int on = 1;
|
int on = 1;
|
||||||
|
|
||||||
/*manage the IP6 header all on own onwn*/
|
/*manage the IP6 header all on own onwn*/
|
||||||
if (setsockopt(sd, IPPROTO_IPV6, IPV6_HDRINCL, &on, sizeof(on))) {
|
if (setsockopt(sd, IPPROTO_IPV6, IPV6_HDRINCL, &on, sizeof(on))) {
|
||||||
|
#else
|
||||||
|
if (true) {
|
||||||
|
#endif
|
||||||
zlog_err("setsockopt IPV6_HDRINCL error: %s", strerror(errno));
|
zlog_err("setsockopt IPV6_HDRINCL error: %s", strerror(errno));
|
||||||
close(sd);
|
close(sd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return sd;
|
return sd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,7 +374,6 @@ int zclient_bfd_command(struct zclient *zc, struct bfd_session_arg *args)
|
||||||
stream_putc(s, args->profilelen);
|
stream_putc(s, args->profilelen);
|
||||||
if (args->profilelen)
|
if (args->profilelen)
|
||||||
stream_put(s, args->profile, args->profilelen);
|
stream_put(s, args->profile, args->profilelen);
|
||||||
|
|
||||||
#else /* PTM BFD */
|
#else /* PTM BFD */
|
||||||
/* Encode timers if this is a registration message. */
|
/* Encode timers if this is a registration message. */
|
||||||
if (args->command != ZEBRA_BFD_DEST_DEREGISTER) {
|
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);
|
event_add_event(bsglobal.tm, _bfd_sess_send, bsp, 0, &bsp->installev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void bfd_sess_uninstall(struct bfd_session_params *bsp)
|
void bfd_sess_uninstall(struct bfd_session_params *bsp)
|
||||||
{
|
{
|
||||||
bsp->lastev = BSE_UNINSTALL;
|
bsp->lastev = BSE_UNINSTALL;
|
||||||
|
|
Loading…
Reference in a new issue