projects
/
project
/
firewall3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Treat redirects as port redirections if the specified dest_ip belongs to the router...
[project/firewall3.git]
/
iptables.c
diff --git
a/iptables.c
b/iptables.c
index
c323e45
..
694dd4f
100644
(file)
--- a/
iptables.c
+++ b/
iptables.c
@@
-747,13
+747,13
@@
void
fw3_ipt_rule_mac(struct fw3_ipt_rule *r, struct fw3_mac *mac)
{
char buf[sizeof("ff:ff:ff:ff:ff:ff\0")];
fw3_ipt_rule_mac(struct fw3_ipt_rule *r, struct fw3_mac *mac)
{
char buf[sizeof("ff:ff:ff:ff:ff:ff\0")];
+ uint8_t *addr = mac->mac.ether_addr_octet;
if (!mac)
return;
sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x",
if (!mac)
return;
sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x",
- mac->mac[0], mac->mac[1], mac->mac[2],
- mac->mac[3], mac->mac[4], mac->mac[5]);
+ addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
fw3_ipt_rule_addarg(r, false, "-m", "mac");
fw3_ipt_rule_addarg(r, mac->invert, "--mac-source", buf);
fw3_ipt_rule_addarg(r, false, "-m", "mac");
fw3_ipt_rule_addarg(r, mac->invert, "--mac-source", buf);