Fortinet white logo
Fortinet white logo

Script Reference Guide

UDP:reject()

UDP:reject()

Allows you to reject a UDP datagram from a client.

Syntax

UDP:reject()

Arguments

N/A

Events

Applicable in STREAM_REQUEST_DATA.

Example

when STREAM_REQUEST_DATA { 
    local header = UDP:receive(20) 
    local len = string.byte(string.sub(header, 3, 3)) 

    if (len < 2) then 
        UDP:reject() 
    end 
} 

Supported Version

FortiADC version 6.1.1 and later.

UDP:reject()

UDP:reject()

Allows you to reject a UDP datagram from a client.

Syntax

UDP:reject()

Arguments

N/A

Events

Applicable in STREAM_REQUEST_DATA.

Example

when STREAM_REQUEST_DATA { 
    local header = UDP:receive(20) 
    local len = string.byte(string.sub(header, 3, 3)) 

    if (len < 2) then 
        UDP:reject() 
    end 
} 

Supported Version

FortiADC version 6.1.1 and later.