Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

coped with the difference of the return value of nd6_storeaddr() betw…

…een KAME and FreeBSD-5.3
  • Loading branch information...
commit 1ba82a7aaaaef34aa97bc4199b3258d6d028083b 1 parent 2711faa
suz authored
9 freebsd5/sys/net/if_arcsubr.c
@@ -169,9 +169,12 @@ arc_output(ifp, m, dst, rt0)
169 169 #endif
170 170 #ifdef INET6
171 171 case AF_INET6:
172   - error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)&adst);
173   - if (error)
174   - return (error);
  172 + /*
  173 + * XXX: nd6_storelladdr()'s return value has different
  174 + * meaning between FreeBSD and KAME.
  175 + */
  176 + if (!nd6_storelladdr(ifp, rt0, m, dst, (u_char *)&adst))
  177 + return (EINVAL); /* XXX */
175 178 atype = ARCTYPE_INET6;
176 179 break;
177 180 #endif
9 freebsd5/sys/net/if_ethersubr.c
@@ -192,9 +192,12 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
192 192 #endif
193 193 #ifdef INET6
194 194 case AF_INET6:
195   - error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst);
196   - if (error)
197   - return error;
  195 + /*
  196 + * XXX: nd6_storelladdr()'s return value has different
  197 + * meaning between FreeBSD and KAME.
  198 + */
  199 + if (!nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst))
  200 + return (EINVAL); /* XXX */
198 201 type = htons(ETHERTYPE_IPV6);
199 202 break;
200 203 #endif
9 freebsd5/sys/net/if_fddisubr.c
@@ -192,9 +192,12 @@ fddi_output(ifp, m, dst, rt0)
192 192 #endif /* INET */
193 193 #ifdef INET6
194 194 case AF_INET6:
195   - error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst);
196   - if (error)
197   - return (error); /* Something bad happened */
  195 + /*
  196 + * XXX: nd6_storelladdr()'s return value has different
  197 + * meaning between FreeBSD and KAME.
  198 + */
  199 + if (!nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst))
  200 + return (EINVAL); /* XXX */
198 201 type = htons(ETHERTYPE_IPV6);
199 202 break;
200 203 #endif /* INET6 */
11 freebsd5/sys/net/if_fwsubr.c
@@ -169,10 +169,13 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
169 169 #ifdef INET6
170 170 case AF_INET6:
171 171 if (unicast) {
172   - error = nd6_storelladdr(&fc->fc_if, rt, m, dst,
173   - (u_char *) destfw);
174   - if (error)
175   - return (error);
  172 + /*
  173 + * XXX: nd6_storelladdr()'s return value has different
  174 + * meaning between FreeBSD and KAME.
  175 + */
  176 + if (!nd6_storelladdr(&fc->fc_if, rt, m, dst,
  177 + (u_char *) destfw))
  178 + return (EINVAL); /* XXX */
176 179 }
177 180 type = ETHERTYPE_IPV6;
178 181 break;
9 freebsd5/sys/net/if_iso88025subr.c
@@ -328,9 +328,12 @@ iso88025_output(ifp, m, dst, rt0)
328 328 #endif /* INET */
329 329 #ifdef INET6
330 330 case AF_INET6:
331   - error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst);
332   - if (error)
333   - return (error);
  331 + /*
  332 + * XXX: nd6_storelladdr()'s return value has different
  333 + * meaning between FreeBSD and KAME.
  334 + */
  335 + if (!nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst))
  336 + return (EINVAL); /* XXX */
334 337 snap_type = ETHERTYPE_IPV6;
335 338 break;
336 339 #endif /* INET6 */

0 comments on commit 1ba82a7

Please sign in to comment.
Something went wrong with that request. Please try again.