From f4e2b7edde860e27757c91881c2a6fbcec1c6434 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 20 Jan 2017 05:03:49 +0000 Subject: Stop using pfsockaddr_union outside of pf so that we can remove its usage inside pf later on. pfsync can use the one from ip_ipsp.h and bridge can have its own version for now. OK mpi@ phessler@ --- sys/net/if_bridge.h | 17 ++++++++++++++--- sys/net/if_pfsync.h | 5 ++--- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/net/if_bridge.h b/sys/net/if_bridge.h index 092d025357e..55a3fa70a9a 100644 --- a/sys/net/if_bridge.h +++ b/sys/net/if_bridge.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.h,v 1.54 2017/01/11 08:47:48 mpi Exp $ */ +/* $OpenBSD: if_bridge.h,v 1.55 2017/01/20 05:03:48 claudio Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -406,12 +406,23 @@ struct bridge_iflist { (_bp1 && _bp2 && ((struct bridge_iflist *)_bp1)->bridge_sc == \ ((struct bridge_iflist *)_bp2)->bridge_sc) +/* + * XXX ip_ipsp.h's sockaddr_union should be converted to sockaddr * + * passing with correct sa_len, then a good approach for cleaning this + * will become more clear. + */ +union brsockaddr_union { + struct sockaddr sa; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; +}; + /* * Bridge tunnel tagging */ struct bridge_tunneltag { - union pfsockaddr_union brtag_peer; - union pfsockaddr_union brtag_local; + union brsockaddr_union brtag_peer; + union brsockaddr_union brtag_local; u_int32_t brtag_id; }; diff --git a/sys/net/if_pfsync.h b/sys/net/if_pfsync.h index 44924e4cde0..1d4b1049af9 100644 --- a/sys/net/if_pfsync.h +++ b/sys/net/if_pfsync.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.48 2015/01/24 00:29:06 deraadt Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.49 2017/01/20 05:03:48 claudio Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -210,10 +210,9 @@ struct pfsync_bus { /* * TDB */ - struct pfsync_tdb { u_int32_t spi; - union pfsockaddr_union dst; + union sockaddr_union dst; u_int64_t rpl; u_int64_t cur_bytes; u_int8_t sproto; -- cgit v1.2.3