Skip to content

Adding source port support via source-ip#345

Merged
ehsandeep merged 1 commit intodevfrom
issue-321-source-port
Jun 9, 2022
Merged

Adding source port support via source-ip#345
ehsandeep merged 1 commit intodevfrom
issue-321-source-port

Conversation

@Mzack9999
Copy link
Copy Markdown
Member

Description

This PR adds support for source port via the existing source-ip parameter

Example

$ sudo go run . -source 192.168.1.2:15000

@Mzack9999 Mzack9999 added Status: Review Needed The issue has a PR attached to it which needs to be reviewed Type: Enhancement Most issues will probably ask for additions or changes. labels Jun 5, 2022
@Mzack9999 Mzack9999 self-assigned this Jun 5, 2022
@Mzack9999 Mzack9999 linked an issue Jun 5, 2022 that may be closed by this pull request

tcp := layers.TCP{
SrcPort: layers.TCPPort(s.listenPort),
SrcPort: layers.TCPPort(s.SourcePort),

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types

Incorrect conversion of an integer with architecture-dependent bit size from [strconv.Atoi](1) to a lower bit size type uint16 without an upper bound check.

tcp := layers.TCP{
SrcPort: layers.TCPPort(s.listenPort),
SrcPort: layers.TCPPort(s.SourcePort),

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types

Incorrect conversion of an integer with architecture-dependent bit size from [strconv.Atoi](1) to a lower bit size type uint16 without an upper bound check.
@Mzack9999 Mzack9999 requested review from Ice3man543 and ehsandeep June 6, 2022 18:12
@ehsandeep ehsandeep merged commit 2adca43 into dev Jun 9, 2022
@ehsandeep ehsandeep deleted the issue-321-source-port branch June 9, 2022 15:14
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Source Port Manipulation

4 participants