]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Some BSD's require the pid explicitly set on route messages.
authorRoy Marples <roy@marples.name>
Tue, 15 Sep 2015 13:37:25 +0000 (13:37 +0000)
committerRoy Marples <roy@marples.name>
Tue, 15 Sep 2015 13:37:25 +0000 (13:37 +0000)
if-bsd.c

index 772f60d80db3ea769668717bb0dc8f7363f90708..069195044747f813d93a6f1fe8c2980590d820d0 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -541,6 +541,7 @@ if_route(unsigned char cmd, const struct rt *rt)
        rtm.hdr.rtm_type = cmd;
        rtm.hdr.rtm_addrs = RTA_DST;
        rtm.hdr.rtm_flags = RTF_UP;
+       rtm.hdr.rtm_pid = getpid();
 #ifdef RTF_PINNED
        if (cmd != RTM_ADD)
                rtm.hdr.rtm_flags |= RTF_PINNED;
@@ -920,6 +921,7 @@ if_route6(unsigned char cmd, const struct rt6 *rt)
        rtm.hdr.rtm_seq = 1;
        rtm.hdr.rtm_type = cmd;
        rtm.hdr.rtm_flags = RTF_UP | (int)rt->flags;
+       rtm.hdr.rtm_pid = getpid();
 #ifdef RTF_PINNED
        if (rtm.hdr.rtm_type != RTM_ADD)
                rtm.hdr.rtm_flags |= RTF_PINNED;