netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: jamal <hadi@cyberus.ca>
Cc: Maillist netdev <netdev@oss.sgi.com>
Subject: [PATCH PKT_SCHED 7/22]: Use rtattr_strcmp where appropriate
Date: Mon, 10 Jan 2005 20:37:54 +0100	[thread overview]
Message-ID: <41E2D992.7000300@trash.net> (raw)

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



[-- Attachment #2: 07.diff --]
[-- Type: text/x-patch, Size: 3971 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/09 22:54:01+01:00 kaber@coreworks.de 
#   [RTNETLINK]: Use rtattr_strcmp where appropriate
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/sched/act_api.c
#   2005/01/09 22:53:52+01:00 kaber@coreworks.de +1 -1
#   [RTNETLINK]: Use rtattr_strcmp where appropriate
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/fib_rules.c
#   2005/01/09 22:53:52+01:00 kaber@coreworks.de +1 -1
#   [RTNETLINK]: Use rtattr_strcmp where appropriate
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/devinet.c
#   2005/01/09 22:53:52+01:00 kaber@coreworks.de +1 -1
#   [RTNETLINK]: Use rtattr_strcmp where appropriate
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/decnet/dn_rules.c
#   2005/01/09 22:53:52+01:00 kaber@coreworks.de +1 -1
#   [RTNETLINK]: Use rtattr_strcmp where appropriate
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/decnet/dn_dev.c
#   2005/01/09 22:53:52+01:00 kaber@coreworks.de +1 -1
#   [RTNETLINK]: Use rtattr_strcmp where appropriate
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
diff -Nru a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
--- a/net/decnet/dn_dev.c	2005-01-10 06:22:11 +01:00
+++ b/net/decnet/dn_dev.c	2005-01-10 06:22:11 +01:00
@@ -662,7 +662,7 @@
 	for(ifap = &dn_db->ifa_list; (ifa=*ifap) != NULL; ifap = &ifa->ifa_next) {
 		void *tmp = rta[IFA_LOCAL-1];
 		if ((tmp && memcmp(RTA_DATA(tmp), &ifa->ifa_local, 2)) ||
-				(rta[IFA_LABEL-1] && strcmp(RTA_DATA(rta[IFA_LABEL-1]), ifa->ifa_label)))
+		    (rta[IFA_LABEL-1] && rtattr_strcmp(rta[IFA_LABEL-1], ifa->ifa_label)))
 			continue;
 
 		dn_dev_del_ifa(dn_db, ifap, 1);
diff -Nru a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
--- a/net/decnet/dn_rules.c	2005-01-10 06:22:11 +01:00
+++ b/net/decnet/dn_rules.c	2005-01-10 06:22:11 +01:00
@@ -88,7 +88,7 @@
 #endif
 			(!rtm->rtm_type || rtm->rtm_type == r->r_action) &&
 			(!rta[RTA_PRIORITY-1] || memcmp(RTA_DATA(rta[RTA_PRIORITY-1]), &r->r_preference, 4) == 0) &&
-			(!rta[RTA_IIF-1] || strcmp(RTA_DATA(rta[RTA_IIF-1]), r->r_ifname) == 0) &&
+			(!rta[RTA_IIF-1] || rtattr_strcmp(rta[RTA_IIF-1], r->r_ifname) == 0) &&
 			(!rtm->rtm_table || (r && rtm->rtm_table == r->r_table))) {
 
 			err = -EPERM;
diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c
--- a/net/ipv4/devinet.c	2005-01-10 06:22:11 +01:00
+++ b/net/ipv4/devinet.c	2005-01-10 06:22:11 +01:00
@@ -399,7 +399,7 @@
 		     memcmp(RTA_DATA(rta[IFA_LOCAL - 1]),
 			    &ifa->ifa_local, 4)) ||
 		    (rta[IFA_LABEL - 1] &&
-		     strcmp(RTA_DATA(rta[IFA_LABEL - 1]), ifa->ifa_label)) ||
+		     rtattr_strcmp(rta[IFA_LABEL - 1], ifa->ifa_label)) ||
 		    (rta[IFA_ADDRESS - 1] &&
 		     (ifm->ifa_prefixlen != ifa->ifa_prefixlen ||
 		      !inet_ifa_match(*(u32*)RTA_DATA(rta[IFA_ADDRESS - 1]),
diff -Nru a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
--- a/net/ipv4/fib_rules.c	2005-01-10 06:22:11 +01:00
+++ b/net/ipv4/fib_rules.c	2005-01-10 06:22:11 +01:00
@@ -119,7 +119,7 @@
 #endif
 		    (!rtm->rtm_type || rtm->rtm_type == r->r_action) &&
 		    (!rta[RTA_PRIORITY-1] || memcmp(RTA_DATA(rta[RTA_PRIORITY-1]), &r->r_preference, 4) == 0) &&
-		    (!rta[RTA_IIF-1] || strcmp(RTA_DATA(rta[RTA_IIF-1]), r->r_ifname) == 0) &&
+		    (!rta[RTA_IIF-1] || rtattr_strcmp(rta[RTA_IIF-1], r->r_ifname) == 0) &&
 		    (!rtm->rtm_table || (r && rtm->rtm_table == r->r_table))) {
 			err = -EPERM;
 			if (r == &local_rule)
diff -Nru a/net/sched/act_api.c b/net/sched/act_api.c
--- a/net/sched/act_api.c	2005-01-10 06:22:11 +01:00
+++ b/net/sched/act_api.c	2005-01-10 06:22:11 +01:00
@@ -112,7 +112,7 @@
 	if (kind) {
 		read_lock(&act_mod_lock);
 		for (a = act_base; a; a = a->next) {
-			if (strcmp((char*)RTA_DATA(kind), a->kind) == 0) {
+			if (rtattr_strcmp(kind, a->kind) == 0) {
 				if (!try_module_get(a->owner)) {
 					read_unlock(&act_mod_lock);
 					return NULL;

                 reply	other threads:[~2005-01-10 19:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41E2D992.7000300@trash.net \
    --to=kaber@trash.net \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).