mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Do not TEE or REDIRECT to self.
This commit is contained in:
parent
a3c7627acf
commit
a5383d83d8
1 changed files with 3 additions and 2 deletions
|
@ -165,8 +165,9 @@ static int _doZtFilter(
|
||||||
continue;
|
continue;
|
||||||
case ZT_NETWORK_RULE_ACTION_TEE:
|
case ZT_NETWORK_RULE_ACTION_TEE:
|
||||||
case ZT_NETWORK_RULE_ACTION_REDIRECT: {
|
case ZT_NETWORK_RULE_ACTION_REDIRECT: {
|
||||||
if (!noRedirect) {
|
const Address fwdAddr(rules[rn].v.fwd.address);
|
||||||
Packet outp(Address(rules[rn].v.fwd.address),RR->identity.address(),Packet::VERB_EXT_FRAME);
|
if ((!noRedirect)&&(fwdAddr != RR->identity.address())) {
|
||||||
|
Packet outp(fwdAddr,RR->identity.address(),Packet::VERB_EXT_FRAME);
|
||||||
outp.append(nconf.networkId);
|
outp.append(nconf.networkId);
|
||||||
outp.append((uint8_t)( ((rt == ZT_NETWORK_RULE_ACTION_REDIRECT) ? 0x04 : 0x02) | (inbound ? 0x08 : 0x00) ));
|
outp.append((uint8_t)( ((rt == ZT_NETWORK_RULE_ACTION_REDIRECT) ? 0x04 : 0x02) | (inbound ? 0x08 : 0x00) ));
|
||||||
macDest.appendTo(outp);
|
macDest.appendTo(outp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue