Bug 224019 - [netgraph] [patch] ng_patch is broken in 10.4-RELEASE
Summary: [netgraph] [patch] ng_patch is broken in 10.4-RELEASE
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.4-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-net (Nobody)
URL:
Keywords: easy, patch
Depends on:
Blocks:
 
Reported: 2017-12-01 13:35 UTC by sd
Modified: 2017-12-05 14:49 UTC (History)
2 users (show)

See Also:


Attachments
patch (399 bytes, patch)
2017-12-01 13:35 UTC, sd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sd 2017-12-01 13:35:23 UTC
Created attachment 188448 [details]
patch

Steps to Reproduce:
#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

Related bug #206185.

It's broken after base r309389 and could be fixed in base 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 (also attached):
--- /sys/netgraph/ng_patch.h.orig	2017-11-23 14:19:54.019040000 +0300
+++ /sys/netgraph/ng_patch.h	2017-12-01 16:21:56.000000000 +0300
@@ -86,7 +86,7 @@
 
 #define	NG_PATCH_CONFIG_TYPE_INFO {					\
 	{ "count",		&ng_parse_uint32_type		},	\
-	{ "csum_flags",		&ng_parse_uint64_type		},	\
+	{ "csum_flags",		&ng_parse_uint32_type		},	\
 	{ "ops",		&ng_patch_ops_array_type		},	\
 	{ NULL }							\
 }
Comment 1 Eugene Grosbein freebsd_committer freebsd_triage 2017-12-01 14:15:43 UTC
Julian, could you please take a look? It seems stable/10 misses MFC after your commits to unbreak ng_patch there.
Comment 2 Julian Elischer freebsd_committer freebsd_triage 2017-12-05 14:42:23 UTC
r309408 introduced an API change in 10 so couldn't go in
I will make this simpler correction now
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-12-05 14:46:52 UTC
A commit references this bug:

Author: julian
Date: Tue Dec  5 14:46:12 UTC 2017
New revision: 326568
URL: https://svnweb.freebsd.org/changeset/base/326568

Log:
  Steps to Reproduce:
  #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 base r309389 and could be fixed in base r309408, but the first one went to 10.4 and the second one didn't.

  PR:		224019
  Submitted by:	sd@mostnet.ru

Changes:
  stable/10/sys/netgraph/ng_patch.h
Comment 4 Julian Elischer freebsd_committer freebsd_triage 2017-12-05 14:49:15 UTC
applied to stable/10