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

Add support for single port "ranges" in flow descriptions #372

Merged
merged 2 commits into from Dec 3, 2021

Conversation

pudelkoM
Copy link
Member

@pudelkoM pudelkoM commented Dec 3, 2021

This PR adds support for single port "ranges" like 8888-8888 in flow descriptions. It covers only the simple case with a single port, not actual ranges. It's a first step towards full support and fixes the errors we're encountering right now:

Error log:

time="2021-12-02T07:06:21Z" level=info msg="Flow Description is: permit out udp from 192.168.102.122/32 to assigned 6128-6128" func="main.(*pdr).parsePDI" file="/pfcpiface/parse-pdr.go:231"
time="2021-12-02T07:06:21Z" level=info msg=from func="main.(*ipFilterRule).parseFlowDesc" file="/pfcpiface/parse-sdf.go:109"
time="2021-12-02T07:06:21Z" level=info msg="[permit out udp from 192.168.102.122/32 to assigned 6128-6128]" func="main.(*ipFilterRule).parseFlowDesc.func1" file="/pfcpiface/parse-sdf.go:92"
time="2021-12-02T07:06:21Z" level=info msg="[permit out udp from 192.168.102.122/32 to assigned 6128-6128]" func="main.(*ipFilterRule).parseFlowDesc.func1" file="/pfcpiface/parse-sdf.go:105"
time="2021-12-02T07:06:21Z" level=info msg="[192.168.102.122 32]" func="main.(*endpoint).parseNet" file="/pfcpiface/parse-sdf.go:28"
time="2021-12-02T07:06:21Z" level=info msg=to func="main.(*ipFilterRule).parseFlowDesc" file="/pfcpiface/parse-sdf.go:109"
time="2021-12-02T07:06:21Z" level=info msg="[permit out udp from 192.168.102.122/32 to assigned 6128-6128]" func="main.(*ipFilterRule).parseFlowDesc.func1" file="/pfcpiface/parse-sdf.go:92"
time="2021-12-02T07:06:21Z" level=info msg="[permit out udp from 192.168.102.122/32 to 0.0.0.0/0 6128-6128]" func="main.(*ipFilterRule).parseFlowDesc.func1" file="/pfcpiface/parse-sdf.go:105"
time="2021-12-02T07:06:21Z" level=info msg="[0.0.0.0 0]" func="main.(*endpoint).parseNet" file="/pfcpiface/parse-sdf.go:28"
time="2021-12-02T07:06:21Z" level=info msg="dst port parse failed  strconv.ParseUint: parsing \"6128-6128\": invalid syntax" func="main.(*ipFilterRule).parseFlowDesc" file="/pfcpiface/parse-sdf.go:143"

@krsna1729 krsna1729 merged commit 6631f80 into master Dec 3, 2021
@krsna1729 krsna1729 deleted the add-port-ranges branch December 3, 2021 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants