diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2015-09-15 02:18:23 -0700 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-05-25 20:38:33 -0400 | 
| commit | 7ec306362453007de1bec322a605600cf5f3c793 (patch) | |
| tree | daf487641436d00cd0ad0c59dcc17c53511ec632 /pimd/pim_ssmpingd.c | |
| parent | 02e51cad49abd85ce644f5219efd5cbd6e6acb21 (diff) | |
pimd: use IPPROTO_IP (not SOL_IP) for IP_PKTINFO
Solaris uses the same socket API for IP_PKTINFO as Linux, but doesn't
have a SOL_IP define.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_ssmpingd.c')
| -rw-r--r-- | pimd/pim_ssmpingd.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c index 82e0722a74..d564bf57bc 100644 --- a/pimd/pim_ssmpingd.c +++ b/pimd/pim_ssmpingd.c @@ -110,9 +110,9 @@ static int ssmpingd_socket(struct in_addr addr, int port, int mttl)    /* Needed to obtain destination address from recvmsg() */    {  #if defined(HAVE_IP_PKTINFO) -    /* Linux IP_PKTINFO */ +    /* Linux and Solaris IP_PKTINFO */      int opt = 1; -    if (setsockopt(fd, SOL_IP, IP_PKTINFO, &opt, sizeof(opt))) { +    if (setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &opt, sizeof(opt))) {        zlog_warn("%s: could not set IP_PKTINFO on socket fd=%d: errno=%d: %s",  		__PRETTY_FUNCTION__, fd, errno, safe_strerror(errno));      }  | 
