-
Notifications
You must be signed in to change notification settings - Fork 621
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Warning on nasl_send when UDP payload may too large and get_mtu
This adds a warning: ``` lib nasl-Message: 14:39:48.023: [374576](test.nasl:11) data payload is larger (65536) than max udp payload (65468) ``` As well as the possibility to get the mtu for used device. To try it out you can run start a udp service on port 4500 and then store: ``` proto = "udp"; port = 500; soc = open_sock_udp( port ); data = ""; mtu = get_mtu(); log_message(data: strcat( "mtu: ", mtu)); for (i = 0; i < mtu; i++) { data = strcat(data, 5); } send(socket:soc, data:data ); res = recv( socket:soc, length:4096 ); log_message(data:res); exit(0); ``` as test.nasl. And run it via `sudo openvas-nasl -X test.nasl`.
- Loading branch information
1 parent
88ed664
commit e64e5f6
Showing
3 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters