svn commit: r257247 - in projects/ifnet/sys: net netpfil/pf
Gleb Smirnoff
glebius at FreeBSD.org
Mon Oct 28 10:32:15 UTC 2013
Author: glebius
Date: Mon Oct 28 10:32:14 2013
New Revision: 257247
URL: http://svnweb.freebsd.org/changeset/base/257247
Log:
Merge head r256150 through r257246.
Modified:
projects/ifnet/sys/net/if.h
projects/ifnet/sys/net/if_var.h
projects/ifnet/sys/netpfil/pf/pf.c
Directory Properties:
projects/ifnet/ (props changed)
projects/ifnet/sys/ (props changed)
Modified: projects/ifnet/sys/net/if.h
==============================================================================
--- projects/ifnet/sys/net/if.h Mon Oct 28 10:12:19 2013 (r257246)
+++ projects/ifnet/sys/net/if.h Mon Oct 28 10:32:14 2013 (r257247)
@@ -35,10 +35,6 @@
#include <sys/cdefs.h>
-#ifdef _KERNEL
-#include <sys/queue.h>
-#endif
-
#if __BSD_VISIBLE
/*
* <net/if.h> does not depend on <sys/time.h> on most other systems. This
@@ -49,8 +45,6 @@
#include <sys/time.h>
#include <sys/socket.h>
#endif
-
-struct ifnet;
#endif
/*
@@ -537,10 +531,4 @@ struct if_nameindex *if_nameindex(void);
unsigned int if_nametoindex(const char *);
__END_DECLS
#endif
-
-#ifdef _KERNEL
-/* XXX - this should go away soon. */
-#include <net/if_var.h>
-#endif
-
#endif /* !_NET_IF_H_ */
Modified: projects/ifnet/sys/net/if_var.h
==============================================================================
--- projects/ifnet/sys/net/if_var.h Mon Oct 28 10:12:19 2013 (r257246)
+++ projects/ifnet/sys/net/if_var.h Mon Oct 28 10:32:14 2013 (r257247)
@@ -58,38 +58,26 @@
* interfaces. These routines live in the files if.c and route.c
*/
-#ifdef __STDC__
-/*
- * Forward structure declarations for function prototypes [sic].
- */
-struct mbuf;
-struct thread;
-struct rtentry;
-struct rt_addrinfo;
+struct rtentry; /* ifa_rtrequest */
+struct rt_addrinfo; /* ifa_rtrequest */
struct socket;
-struct ether_header;
struct carp_if;
struct carp_softc;
struct ifvlantrunk;
-struct route;
+struct route; /* if_output */
struct vnet;
-#endif
-
-#include <sys/queue.h> /* get TAILQ macros */
#ifdef _KERNEL
-#include <sys/mbuf.h>
-#include <sys/eventhandler.h>
+#include <sys/mbuf.h> /* ifqueue only? */
#include <sys/buf_ring.h>
#include <net/vnet.h>
#endif /* _KERNEL */
#include <sys/counter.h>
#include <sys/lock.h> /* XXX */
-#include <sys/mutex.h> /* XXX */
+#include <sys/mutex.h> /* struct ifqueue */
#include <sys/rwlock.h> /* XXX */
#include <sys/sx.h> /* XXX */
-#include <sys/event.h> /* XXX */
-#include <sys/_task.h>
+#include <sys/_task.h> /* if_link_task */
#define IF_DUNIT_NONE -1
@@ -220,8 +208,6 @@ struct ifnet {
void *if_pspare[8]; /* 1 netmap, 7 TDB */
};
-typedef void if_init_f_t(void *);
-
/*
* XXX These aliases are terribly dangerous because they could apply
* to anything.
@@ -367,6 +353,7 @@ void if_maddr_runlock(struct ifnet *ifp)
} while(0)
#ifdef _KERNEL
+#ifdef SYS_EVENTHANDLER_H
/* interface link layer address change event */
typedef void (*iflladdr_event_handler_t)(void *, struct ifnet *);
EVENTHANDLER_DECLARE(iflladdr_event, iflladdr_event_handler_t);
@@ -382,6 +369,7 @@ EVENTHANDLER_DECLARE(ifnet_departure_eve
/* Interface link state change event */
typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int);
EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t);
+#endif /* SYS_EVENTHANDLER_H */
/*
* interface groups
@@ -404,6 +392,7 @@ struct ifg_list {
TAILQ_ENTRY(ifg_list) ifgl_next;
};
+#ifdef SYS_EVENTHANDLER_H
/* group attach event */
typedef void (*group_attach_event_handler_t)(void *, struct ifg_group *);
EVENTHANDLER_DECLARE(group_attach_event, group_attach_event_handler_t);
@@ -413,6 +402,7 @@ EVENTHANDLER_DECLARE(group_detach_event,
/* group change event */
typedef void (*group_change_event_handler_t)(void *, const char *);
EVENTHANDLER_DECLARE(group_change_event, group_change_event_handler_t);
+#endif /* SYS_EVENTHANDLER_H */
#define IF_AFDATA_LOCK_INIT(ifp) \
rw_init(&(ifp)->if_afdata_lock, "if_afdata")
Modified: projects/ifnet/sys/netpfil/pf/pf.c
==============================================================================
--- projects/ifnet/sys/netpfil/pf/pf.c Mon Oct 28 10:12:19 2013 (r257246)
+++ projects/ifnet/sys/netpfil/pf/pf.c Mon Oct 28 10:32:14 2013 (r257247)
@@ -4554,7 +4554,7 @@ pf_icmp_state_lookup(struct pf_state_key
if ((*state)->rule.ptr->type &&
(((*state)->direction == direction) ?
PF_IN : PF_OUT) != icmp_dir) {
- if (pf_status.debug >= PF_DEBUG_MISC) {
+ if (V_pf_status.debug >= PF_DEBUG_MISC) {
printf("pf: icmp type %d in wrong direction (%d): ",
icmp_dir, direction);
pf_print_state(*state);
@@ -4593,6 +4593,8 @@ pf_test_state_icmp(struct pf_state **sta
break;
#endif /* INET6 */
+ default:
+ panic("%s: proto %d\n", __func__, pd->proto);
}
if (pf_icmp_mapping(pd, icmptype, &icmp_dir, &multi,
More information about the svn-src-projects
mailing list