summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2014-01-21 21:27:15 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2014-01-21 21:27:15 +0000
commitbbf957cc5adb91037b33e37b595a467847061996 (patch)
treec3a16f9011f8e55c8aca4f5215d354ea23b1c833 /sys/net
parent7f21a9bf7d9ba818a2d0d26b4379d9ea3651461e (diff)
allow pflow(4) to determine the src IP address based on the route
table if flowsrc is not set. Now works with new udp checksum code. From Nathanael Rensen (nathanael.openbsd AT list DOT polymorpheus DOT com), tweak and ok florian@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_pflow.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c
index cabad1efbe6..af7453c5974 100644
--- a/sys/net/if_pflow.c
+++ b/sys/net/if_pflow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflow.c,v 1.38 2013/11/01 14:34:27 florian Exp $ */
+/* $OpenBSD: if_pflow.c,v 1.39 2014/01/21 21:27:14 benno Exp $ */
/*
* Copyright (c) 2011 Florian Obser <florian@narrans.de>
@@ -426,7 +426,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if ((ifp->if_flags & IFF_UP) &&
sc->sc_receiver_ip.s_addr != INADDR_ANY &&
sc->sc_receiver_port != 0 &&
- sc->sc_sender_ip.s_addr != INADDR_ANY &&
sc->sc_sender_port != 0) {
ifp->if_flags |= IFF_RUNNING;
sc->sc_gcounter=pflowstats.pflow_flows;
@@ -506,7 +505,6 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if ((ifp->if_flags & IFF_UP) &&
sc->sc_receiver_ip.s_addr != INADDR_ANY &&
sc->sc_receiver_port != 0 &&
- sc->sc_sender_ip.s_addr != INADDR_ANY &&
sc->sc_sender_port != 0) {
ifp->if_flags |= IFF_RUNNING;
sc->sc_gcounter=pflowstats.pflow_flows;