Page MenuHomeVyOS Platform

Policy Route TCP-MSS Behavior Different from 1.3.x
Closed, ResolvedPublicBUG

Description

This bug report is filed after a troubleshooting session at the Slack channel, as requested by @Viacheslav

In 1.3.3, the following policy rule set worked for applying set-mss and setting table on 1 packet

Interfaces:
eth1.1761: LAN VLAN
tun0: a GRE tunnel to a VPS

1.3 config.boot excerpt

policy {
    route VIA-TUN {
        rule 4 {
            protocol tcp
            set {
                tcp-mss 1436
            }
            source {
                address 10.105.0.0/16
            }
            tcp {
                flags SYN
            }
        }
        rule 5 {
            destination {
                address 10.0.0.0/8
            }
            set {
                table main
            }
        }
        rule 6 {
            destination {
                address <WAN IP address>
            }
            protocol tcp_udp
            set {
                table main
            }
        }
        rule 10 {
            destination {
                address !10.0.0.0/8
            }
            set {
                table 100
            }
            source {
                address 10.105.0.0/16
            }
        }
    }
}

However, after updating to 1.4.0-epa2, the rule is no longer working

1.4.0-epa2 config.boot excerpt

policy {
    route VIA-TUN {
        interface "eth1.1761"
        rule 4 {
            protocol "tcp"
            set {
                tcp-mss "1436"
            }
            source {
                address "10.105.0.0/16"
            }
            tcp {
                flags {
                    syn
                }
            }
        }
        rule 5 {
            destination {
                address "10.0.0.0/8"
            }
            set {
                table "main"
            }
        }
        rule 6 {
            destination {
                address "<WAN IP address>"
            }
            protocol "tcp_udp"
            set {
                table "main"
            }
        }
        rule 10 {
            destination {
                address "!10.0.0.0/8"
            }
            set {
                table "100"
            }
            source {
                address "10.105.0.0/16"
            }
        }
    }
}

In order to make it work again, the following config has to be applied:

1.4.0-epa2 show policy excerpt
Rule 4 here is replaced by rule 11

policy {
    route VIA-MISAKA-HKG {
    interface eth1.1761
    rule 5 {
        destination {
            address 10.0.0.0/8
        }
        set {
            table main
        }
    }
    rule 6 {
        destination {
            address <WAN IP address>
        }
        protocol tcp_udp
        set {
            table main
        }
    }
    rule 10 {
        destination {
            address !10.0.0.0/8
        }
        disable
        protocol tcp
        set {
            table 100
            tcp-mss 1436
        }
        source {
            address 10.105.0.0/16
        }
        tcp {
            flags {
                syn
            }
        }
    }
    rule 11 {
        destination {
            address !10.0.0.0/8
        }
        set {
            table 100
        }
        source {
            address 10.105.0.0/16
        }
    }
}

Details

Difficulty level
Normal (likely a few hours)
Version
1.4.0-epa2, 1.5-rolling-202404141045
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav renamed this task from Policy Route Behavior Different from 1.3.x to Policy Route TCP-MSS Behavior Different from 1.3.x.Mar 31 2024, 10:24 AM
Viacheslav triaged this task as Normal priority.
Viacheslav changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
n.fort changed the task status from Open to Confirmed.Tue, Apr 16, 4:57 PM
n.fort claimed this task.
n.fort raised the priority of this task from Normal to High.
n.fort changed Version from 1.4.0-epa2 to 1.4.0-epa2, 1.5-rolling-202404141045.
n.fort changed the task status from Confirmed to Needs testing.Wed, Apr 17, 8:56 AM
n.fort moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta (1.4.0-epa3) board.
n.fort moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.