diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-21 14:48:29 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-21 14:48:29 +0000 |
commit | bce004ad263f9c417517a0cf3a67eb6b993c85c1 (patch) | |
tree | 86ba2bb7be69f82d8c6f4e9ec3c28459cec8bf18 /sys/net/if_enc.c | |
parent | 2f43a9478751edbc1dd243b2ba8927fc8412c7d0 (diff) |
Fix IPsec route addition broken since the removal of the link-layer
addresses from the per-ifp list.
While here document why enc(4) needs a link-layer address, or at
least something that seems to be one.
Found the hard way and fix tested by naddy@, ok mikeb@, henning@
Diffstat (limited to 'sys/net/if_enc.c')
-rw-r--r-- | sys/net/if_enc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c index 27630150942..083fc5ce665 100644 --- a/sys/net/if_enc.c +++ b/sys/net/if_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_enc.c,v 1.53 2013/09/27 14:10:01 bluhm Exp $ */ +/* $OpenBSD: if_enc.c,v 1.54 2014/05/21 14:48:28 mpi Exp $ */ /* * Copyright (c) 2010 Reyk Floeter <reyk@vantronix.net> @@ -97,6 +97,11 @@ enc_clone_create(struct if_clone *ifc, int unit) if_attach(ifp); if (unit == 0) if_addgroup(ifp, ifc->ifc_name); + /* + * enc(4) does not have a link-layer address but rtrequest1() + * wants an ifa for every route entry. So let's allocate + * a fake and empty ifa of type AF_LINK for this purpose. + */ if_alloc_sadl(ifp); #if NBPFILTER > 0 |