aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_source.c
diff options
context:
space:
mode:
authorLutz Donnerhacke <donner@FreeBSD.org>2021-01-17 20:35:28 +0000
committerLutz Donnerhacke <donner@FreeBSD.org>2021-01-17 21:17:01 +0000
commit75e7ef74dfc12e01b1ef4706110d238639e04543 (patch)
treeeb8f9fd995a7ddb073fc78eb7adb93afbfac7f89 /sys/netgraph/ng_source.c
parent74935ce881ea7d0abdd59ccae10c6593d4ac14e6 (diff)
downloadsrc-75e7ef74dfc12e01b1ef4706110d238639e04543.tar.gz
src-75e7ef74dfc12e01b1ef4706110d238639e04543.zip
netgraph/ng_source: Allow ng_source to inject into any netgraph network
PR: 240530 Reviewed by: kp Approved by: kp (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D21968
Diffstat (limited to 'sys/netgraph/ng_source.c')
-rw-r--r--sys/netgraph/ng_source.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c
index da8f42381ac3..401548da65d0 100644
--- a/sys/netgraph/ng_source.c
+++ b/sys/netgraph/ng_source.c
@@ -683,8 +683,8 @@ ng_source_clr_data (sc_p sc)
static int
ng_source_start(sc_p sc, uint64_t packets)
{
- if (sc->output_ifp == NULL) {
- printf("ng_source: start without iface configured\n");
+ if (sc->output_ifp == NULL && sc->stats.maxPps == 0) {
+ printf("ng_source: start without iface or pps configured\n");
return (ENXIO);
}