diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 308578b4703..3615bab27b3 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -511,7 +511,7 @@ dco_multi_get_localaddr(struct multi_context *m, struct multi_instance *mi, #if ENABLE_IP_PKTINFO struct context *c = &mi->context; - if (!(c->options.sockflags & SF_USE_IP_PKTINFO)) + if (!proto_is_udp(c->c2.link_socket->info.proto) || !(c->options.sockflags & SF_USE_IP_PKTINFO)) { return false; }