Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting % symbol in string with error_rule function of rules.py #34

Open
yichoe opened this issue Mar 22, 2013 · 5 comments
Open

Conflicting % symbol in string with error_rule function of rules.py #34

yichoe opened this issue Mar 22, 2013 · 5 comments

Comments

@yichoe
Copy link

yichoe commented Mar 22, 2013

% symbol in string causes error in error_rule function of rules.py.

@yichoe
Copy link
Author

yichoe commented Mar 28, 2013

It happens when roswtf checks IP address. The IPv6 uses a zone index to provide routing information. The zone index is appended to the address, separated by '%'. This notation causes syntax conflict with Python when roswtf deals with it.

In case of URI, they are finding solution to avoid syntax conflict like here:

http://tools.ietf.org/html/draft-fenner-literal-zone-02

I think there are two ways to resolve it;

(1) Avoid substitution by dictionary in rules.py when checking local network configuration, because this substitution by dictionary doesn't affect results.
(2) Return IP address information in network.py after replacing '%' symbols in IPv6 address by '/' like ubuntu.

@stonier
Copy link
Member

stonier commented Mar 28, 2013

That document isn't english! I don't understand a thing...

I think I like 2) better. It's common in python and cmake to convert unconvential windows characters (like slashes) to unix equivalents.

Does it actually break anything else by converting to /? e.g. who uses that data after you converted?

@yichoe
Copy link
Author

yichoe commented Mar 28, 2013

Strange.. I can see english from that link.

Since only roswtf refers roswtf\network.py, I think it will not make trouble to others although % is converted to / in roswtf\network.py.

@stonier
Copy link
Member

stonier commented Mar 29, 2013

Yeah, it's english, but its lawyer speak. Illegible!

@stonier
Copy link
Member

stonier commented Mar 29, 2013

Just for the record, examples of the differing formats are like:

# Linux
fe80::6ef0:49ff:fe78:1259/64
# Windows
fe80::49c9:fc07:8601:f192%12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants