diff mbox

[ovs-dev] Fix compiling error in netbsd

Message ID 1481000640-18310-1-git-send-email-hkang.sunysb@gmail.com
State Accepted
Headers show

Commit Message

Hui Kang Dec. 6, 2016, 5:04 a.m. UTC
In some netbsd version, RTF_LLINFO is undefined

Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
---
 lib/netdev-bsd.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ben Pfaff Dec. 6, 2016, 5:01 p.m. UTC | #1
On Tue, Dec 06, 2016 at 12:04:00AM -0500, Hui Kang wrote:
> In some netbsd version, RTF_LLINFO is undefined
> 
> Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>

Applied to master, thanks!

Should I backport this to OVS 2.6?

(Are you the same Hui Kang already listed in AUTHORS.rst?  Should we
update your email address?)

Thanks,

Ben.
Hui Kang Dec. 6, 2016, 5:11 p.m. UTC | #2
On Tue, Dec 6, 2016 at 12:01 PM, Ben Pfaff <blp@ovn.org> wrote:
> On Tue, Dec 06, 2016 at 12:04:00AM -0500, Hui Kang wrote:
>> In some netbsd version, RTF_LLINFO is undefined
>>
>> Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
>
> Applied to master, thanks!
>
> Should I backport this to OVS 2.6?

Yes, I think so. (Although I test ovs only on netbsd 7.0)

>
> (Are you the same Hui Kang already listed in AUTHORS.rst?  Should we
> update your email address?)

No, that's fine. My name is in the AUTHORS.rst with the corporate email address.

Thanks again for merging the PR.

- Hui

>
> Thanks,
>
> Ben.
Ben Pfaff Dec. 6, 2016, 5:55 p.m. UTC | #3
On Tue, Dec 06, 2016 at 12:11:04PM -0500, Hui Kang wrote:
> On Tue, Dec 6, 2016 at 12:01 PM, Ben Pfaff <blp@ovn.org> wrote:
> > On Tue, Dec 06, 2016 at 12:04:00AM -0500, Hui Kang wrote:
> >> In some netbsd version, RTF_LLINFO is undefined
> >>
> >> Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
> >
> > Applied to master, thanks!
> >
> > Should I backport this to OVS 2.6?
> 
> Yes, I think so. (Although I test ovs only on netbsd 7.0)

Thanks, applied to branch-2.6 also then.

> Thanks again for merging the PR.

You're welcome!
diff mbox

Patch

diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c
index 75a330b..94c515d 100644
--- a/lib/netdev-bsd.c
+++ b/lib/netdev-bsd.c
@@ -1357,7 +1357,11 @@  netdev_bsd_arp_lookup(const struct netdev *netdev OVS_UNUSED,
     mib[2] = 0;
     mib[3] = AF_INET;
     mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
     mib[5] = RTF_LLINFO;
+#else
+    mib[5] = 0;
+#endif
     if (sysctl(mib, 6, NULL, &needed, NULL, 0) == -1) {
         error = errno;
         goto error;