netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch: namsiz
@ 2005-01-16 18:35 Jamal Hadi Salim
  2005-01-16 18:49 ` Patrick McHardy
  0 siblings, 1 reply; 11+ messages in thread
From: Jamal Hadi Salim @ 2005-01-16 18:35 UTC (permalink / raw)
  To: David S. Miller; +Cc: Patrick McHardy, netdev

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]


heres one ive wanted to do for a while - dissociate action name size
from ifnamsiz. for now set it to namize, but later may change it.

cheers,
jamal

[-- Attachment #2: bl_p --]
[-- Type: text/plain, Size: 1153 bytes --]

--- a/include/net/act_api.h	2005/01/16 13:23:00	1.1
+++ b/include/net/act_api.h	2005/01/16 13:24:13
@@ -40,6 +40,7 @@
 
 #define ACT_P_CREATED 1
 #define ACT_P_DELETED 1
+#define ANAMSIZ IFNAMSIZ
 
 struct tcf_act_hdr
 {
--- a/net/sched/act_api.c	2005/01/16 13:21:21	1.1
+++ b/net/sched/act_api.c	2005/01/16 13:24:33
@@ -227,7 +227,7 @@
 	if (a->ops == NULL || a->ops->dump == NULL)
 		return err;
 
-	RTA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
+	RTA_PUT(skb, TCA_KIND, ANAMSIZ, a->ops->kind);
 	if (tcf_action_copy_stats(skb, a))
 		goto rtattr_failure;
 	r = (struct rtattr*) skb->tail;
@@ -272,7 +272,7 @@
 {
 	struct tc_action *a;
 	struct tc_action_ops *a_o;
-	char act_name[IFNAMSIZ];
+	char act_name[ANAMSIZ];
 	struct rtattr *tb[TCA_ACT_MAX+1];
 	struct rtattr *kind;
 
@@ -284,10 +284,10 @@
 		kind = tb[TCA_ACT_KIND-1];
 		if (kind == NULL)
 			goto err_out;
-		if (rtattr_strlcpy(act_name, kind, IFNAMSIZ) >= IFNAMSIZ)
+		if (rtattr_strlcpy(act_name, kind, ANAMSIZ) >= ANAMSIZ)
 			goto err_out;
 	} else {
-		if (strlcpy(act_name, name, IFNAMSIZ) >= IFNAMSIZ)
+		if (strlcpy(act_name, name, ANAMSIZ) >= ANAMSIZ)
 			goto err_out;
 	}
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-01-24 13:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-16 18:35 patch: namsiz Jamal Hadi Salim
2005-01-16 18:49 ` Patrick McHardy
2005-01-16 18:56   ` Thomas Graf
2005-01-16 19:17     ` Jamal Hadi Salim
2005-01-16 19:32       ` path: module replay jamal
2005-01-16 19:43         ` Patrick McHardy
2005-01-16 19:50           ` Patrick McHardy
2005-01-19  4:26         ` Patrick McHardy
2005-01-19 13:35           ` jamal
2005-01-19 14:02             ` Patrick McHardy
2005-01-24 13:28           ` jamal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).