Skip to contentSkip to conversation

RULE: Add ifdef to FIB_RULE_INVERT since it is missing.

PATCH In review Masahide NAKAMURA 3 participants 3 messages Dec 5, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/7 RULE: Add ifdef to FIB_RULE_INVERT since it is missing.

---
 ip/iprule.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
ip/iprule.c +4 -0
index c584b18..1da64b8 100644
@@ -83,8 +83,10 @@ int print_rule(const struct sockaddr_nl 
 	else
 		fprintf(fp, "0:\t");
 
+#ifdef FIB_RULE_INVERT
 	if (r->rtm_flags & FIB_RULE_INVERT)
 		fprintf(fp, "not ");
+#endif
 
 	if (tb[RTA_SRC]) {
 		if (r->rtm_src_len != host_len) {
@@ -224,7 +226,9 @@ static int iprule_modify(int cmd, int ar
 
 	while (argc > 0) {
 		if (strcmp(*argv, "not") == 0) {
+#ifdef FIB_RULE_INVERT
 			req.r.rtm_flags |= FIB_RULE_INVERT;
+#endif
 		} else if (strcmp(*argv, "from") == 0) {
 			inet_prefix dst;
 			NEXT_ARG();
Signature · 1 line
1.4.2
#1 lore raw

* Masahide NAKAMURA <[email protected]> 2006-12-05 19:15

Quoted 21 lines
---
 ip/iprule.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
ip/iprule.c +2 -0
index c584b18..1da64b8 100644
@@ -83,8 +83,10 @@ int print_rule(const struct sockaddr_nl 
 	else
 		fprintf(fp, "0:\t");
 
+#ifdef FIB_RULE_INVERT
 	if (r->rtm_flags & FIB_RULE_INVERT)
 		fprintf(fp, "not ");
+#endif
 
 	if (tb[RTA_SRC]) {
 		if (r->rtm_src_len != host_len) {

ip/iprule.c static int iprule_modify(int cmd, int ar · line 234

Quoted 9 lines
ip/iprule.c +2 -0
@@ -224,7 +226,9 @@ static int iprule_modify(int cmd, int ar
 
 	while (argc > 0) {
 		if (strcmp(*argv, "not") == 0) {
+#ifdef FIB_RULE_INVERT
 			req.r.rtm_flags |= FIB_RULE_INVERT;
+#endif
 		} else if (strcmp(*argv, "from") == 0) {
 			inet_prefix dst;
 			NEXT_ARG();

It's missing because you removed it.

#2 lore raw
Quoted 23 lines · On Tue, 5 Dec 2006 11:42:31 +0100 Thomas Graf <[email protected]> wrote:

* Masahide NAKAMURA <[email protected]> 2006-12-05 19:15

Quoted 22 lines
---
 ip/iprule.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
ip/iprule.c +2 -0
index c584b18..1da64b8 100644
@@ -83,8 +83,10 @@ int print_rule(const struct sockaddr_nl 
 	else
 		fprintf(fp, "0:\t");
 
+#ifdef FIB_RULE_INVERT
 	if (r->rtm_flags & FIB_RULE_INVERT)
 		fprintf(fp, "not ");
+#endif
 
 	if (tb[RTA_SRC]) {
 		if (r->rtm_src_len != host_len) {
@@ -224,7 +226,9 @@ static int iprule_modify(int cmd, int ar
 
Quoted 10 lines

ip/iprule.c static int iprule_modify(int cmd, int ar · line 234

Quoted 8 lines
ip/iprule.c +2 -0
 	while (argc > 0) {
 		if (strcmp(*argv, "not") == 0) {
+#ifdef FIB_RULE_INVERT
 			req.r.rtm_flags |= FIB_RULE_INVERT;
+#endif
 		} else if (strcmp(*argv, "from") == 0) {
 			inet_prefix dst;
 			NEXT_ARG();

It's missing because you removed it.

Not applied, FIB_RULE_INVERT stays

Signature · 1 line
Stephen Hemminger <[email protected]>