diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2018-02-08 02:25:45 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2018-02-08 02:25:45 +0000 |
commit | 4c2e2525b5c8a0fb232b86bd43d74a7d45801dd9 (patch) | |
tree | 44b12e6835cc65a4f2263ccaf7b9dd895ea8ed48 /sys/net/pf_ioctl.c | |
parent | 19a83488d0a029e5c126712b77dda1abadcb28e7 (diff) |
add DIOCGETSYNFLWATS to get current synflood detection watermarks,
ok claudio benno procter
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r-- | sys/net/pf_ioctl.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 63f5c86ae45..078caeb71fa 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,8 +1,8 @@ -/* $OpenBSD: pf_ioctl.c,v 1.330 2018/02/07 06:11:43 henning Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.331 2018/02/08 02:25:44 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier - * Copyright (c) 2002 - 2013 Henning Brauer <henning@openbsd.org> + * Copyright (c) 2002 - 2018 Henning Brauer <henning@openbsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -943,6 +943,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) case DIOCIGETIFACES: case DIOCSETIFFLAG: case DIOCCLRIFFLAG: + case DIOCGETSYNFLWATS: break; case DIOCRCLRTABLES: case DIOCRADDTABLES: @@ -978,6 +979,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) case DIOCOSFPGET: case DIOCGETSRCNODES: case DIOCIGETIFACES: + case DIOCGETSYNFLWATS: break; case DIOCRCLRTABLES: case DIOCRADDTABLES: @@ -2655,6 +2657,15 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) break; } + case DIOCGETSYNFLWATS: { + struct pfioc_synflwats *io = (struct pfioc_synflwats *)addr; + + PF_LOCK(); + error = pf_syncookies_getwats(io); + PF_UNLOCK(); + break; + } + case DIOCSETSYNCOOKIES: { u_int8_t *mode = (u_int8_t *)addr; |