* [PATCH PKT_SCHED 7/22]: Use rtattr_strcmp where appropriate
@ 2005-01-10 19:37 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-01-10 19:37 UTC (permalink / raw)
To: jamal; +Cc: Maillist netdev
[-- 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-10 19:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-10 19:37 [PATCH PKT_SCHED 7/22]: Use rtattr_strcmp where appropriate Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.