Skip to content

Commit

Permalink
fixing logic in the IPv6 forwarding setting check
Browse files Browse the repository at this point in the history
From akarl10 on GitHub:

	(value != 1 || value != 2) is always true
	should be (value != 1 && value != 2)
  • Loading branch information
reubenhwk committed Oct 2, 2013
1 parent efddc40 commit e3cbda3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2013/10/02 releasing 1.9.5
minor fix in IPv6 forwarding setting check <akarl10>

2013/10/01 releasing 1.9.4

2013/09/24 Added a Makefile target to generate hashes and a gpg signature
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# If adding rcX, be sure to separate with a '-'
#
1.9.4
1.9.5
4 changes: 2 additions & 2 deletions radvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,13 +830,13 @@ check_ip6_forwarding(void)
*
* Which is sometimes used on routers performing RS on their WAN (ppp, etc.) links
*/
if ((value != 1 || value != 2) && !warned) {
if (!warned && value != 1 && value != 2) {
warned = 1;
flog(LOG_DEBUG, "IPv6 forwarding setting is: %u, should be 1 or 2", value);
return(-1);
}
#else
if (value != 1 && !warned) {
if (!warned && value != 1) {
warned = 1;
flog(LOG_DEBUG, "IPv6 forwarding setting is: %u, should be 1", value);
return(-1);
Expand Down

0 comments on commit e3cbda3

Please sign in to comment.