Hi,
StoreIPAddress has a bug: if the OFFSET argument is anything other than
"src", configure() returns an error.
I've attached a patch.
Cheers,
Vlad
>From 798f0f1678b43ba68c5bcbc92d34f2f40ee2de17 Mon Sep 17 00:00:00 2001
From: Vladimir Olteanu <[email protected]>
Date: Mon, 23 Sep 2013 10:27:57 +0200
Subject: [PATCH] StoreIPAddress: fixed conf parsing
---
elements/ip/storeipaddress.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/elements/ip/storeipaddress.cc b/elements/ip/storeipaddress.cc
index c63c536..ba4047f 100644
--- a/elements/ip/storeipaddress.cc
+++ b/elements/ip/storeipaddress.cc
@@ -49,9 +49,9 @@ StoreIPAddress::configure(Vector<String> &conf, ErrorHandler *errh)
return r;
if (offset.lower() == "src")
_offset = -12;
- else if (conf.back().lower() == "dst")
+ else if (offset.lower() == "dst")
_offset = -16;
- else if (!IntArg().parse(conf.back(), _offset) || _offset < 0)
+ else if (!IntArg().parse(offset, _offset) || _offset < 0)
return errh->error("type mismatch: OFFSET requires integer");
return 0;
}
--
1.8.1.4
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click