Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Apr 2021 17:57:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 255495] udp socket inheritance after fork+exec
Message-ID:  <bug-255495-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255495

            Bug ID: 255495
           Summary: udp socket inheritance after fork+exec
           Product: Base System
           Version: 12.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: net@FreeBSD.org
          Reporter: eugen@freebsd.org
                CC: mav@FreeBSD.org, melifaro@FreeBSD.org

I observe the following unexpected behaviour while running both net/frr7 and
net/mpd5 within same 12.2-STABLE/amd64 system. After boot, it runs just fin=
e:

# sockstat | fgrep frr
frr      staticd    37908 6  dgram  -> /var/run/logpriv
frr      staticd    37908 10 stream -> /var/run/frr/zserv.api
frr      staticd    37908 11 stream /var/run/frr/staticd.vty
frr      ospfd      37903 6  dgram  -> /var/run/logpriv
frr      ospfd      37903 10 stream -> /var/run/frr/zserv.api
frr      ospfd      37903 11 stream /var/run/frr/ospfd.vty
frr      zebra      37898 6  dgram  -> /var/run/logpriv
frr      zebra      37898 18 stream /var/run/frr/zserv.api
frr      zebra      37898 21 stream /var/run/frr/zebra.vty
frr      zebra      37898 23 stream /var/run/frr/zserv.api
frr      zebra      37898 28 stream /var/run/frr/zserv.api

# sockstat | fgrep mpd5 | fgrep udp4
root     mpd5       26675 26 udp4   *:1701                *:*

That is, mpd5 expects incoming L2TP connections at port udp/1701 and frr7
daemon do not use any UDP sockets, as configured.

The mpd5 daemon has ip-down/ip-up scripts that may do "service frr stop" and
"service frr start" in come cases, so frr7 daemons may be started as
grandchildren of mpd5 process. After that, I observe this:

# sockstat | fgrep frr
frr      staticd    40712 6  dgram  -> /var/run/logpriv
frr      staticd    40712 12 stream -> /var/run/frr/zserv.api
frr      staticd    40712 13 stream /var/run/frr/staticd.vty
frr      staticd    40712 26 udp4   *:1701                *:*
frr      ospfd      40707 6  dgram  -> /var/run/logpriv
frr      ospfd      40707 12 stream -> /var/run/frr/zserv.api
frr      ospfd      40707 13 stream /var/run/frr/ospfd.vty
frr      ospfd      40707 26 udp4   *:1701                *:*
frr      zebra      40702 6  dgram  -> /var/run/logpriv
frr      zebra      40702 24 stream /var/run/frr/zserv.api
frr      zebra      40702 25 stream /var/run/frr/zebra.vty
frr      zebra      40702 26 udp4   *:1701                *:*
frr      zebra      40702 30 stream /var/run/frr/zserv.api
frr      zebra      40702 35 stream /var/run/frr/zserv.api

frr daemons somehow inherit udp4/1501 socket and that is bad for local L2TP
service, it is broken now.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255495-7501>