Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Dec 2017 12:39:27 +0300
From:      Dmitry Selivanov <sd@mostnet.ru>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   ng_patch is broken in 10.4-RELEASE
Message-ID:  <502ae893-1b55-305d-f1c4-de7f22159a15@mostnet.ru>

next in thread | raw e-mail | index | archive | help
#ngctl mkpeer ipfw: patch 7 in
#ngctl name ipfw:7 tcp_rst
#ngctl connect ipfw: tcp_rst: 8 out
#ngctl msg tcp_rst: setconfig { count=1 csum_flags=0 ops=[ { mode=8 value=4 length=1 offset=33 } ] }
ngctl: send msg: Argument list too long

It's broken after r309389 and could be fixed in r309408, but the first one went to 10.4 and the second one didn't.

11.0 didn't get this patches, 11.1 got both, so they are OK.

Patch to fix:
--- /sys/netgraph/ng_patch.h.orig	2017-11-23 14:19:54.019040000 +0300
+++ /sys/netgraph/ng_patch.h	2017-11-30 15:34:23.000000000 +0300
@@ -80,7 +80,7 @@

  struct ng_patch_config {
  	uint32_t	count;
-	uint32_t	csum_flags;
+	uint64_t	csum_flags;
  	struct ng_patch_op ops[];
  };


In this patch new uint64_t type is utilized. Instead this you can get back modified "csum_flags" to ng_parse_uint32_type in NG_PATCH_CONFIG_TYPE_INFO, which was changed in r309389.
Patch and rebuild ng_patch module.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?502ae893-1b55-305d-f1c4-de7f22159a15>