(pkt)
Check for SYN fragmentation. Drop a packet if
        SYN flag is set, and IP flag is set to "MF" or
        fragment offset > 0.

        Args:
            scapy_pkt (scapy_object): Packet to filter

        Raises:
            None

        Returns:
            bool (int): Allow or drop
Check for SYN fragmentation. Drop a packet if
        SYN flag is set, and IP flag is set to "MF" or
        fragment offset > 0.
Check for SYN fragmentation . Drop a packet if SYN flag is set and IP flag is set to MF or fragment offset > 0 .
def syn_fragmentation_attack(pkt):
        """
        Check for SYN fragmentation. Drop a packet if
        SYN flag is set, and IP flag is set to "MF" or
        fragment offset > 0.

        Args:
            scapy_pkt (scapy_object): Packet to filter

        Raises:
            None

        Returns:
            bool (int): Allow or drop
        """
        if (pkt.haslayer(scapy.IP) and
            pkt.haslayer(scapy.TCP)):
            tcp_flag = pkt[scapy.TCP].flags
            if tcp_flag == "S":
                flags = str(pkt[scapy.IP].flags)
                frag = int(pkt[scapy.IP].frag)
                if (flags == "MF" or frag > 0):
                    return 0
                else:
                    return 1
            else:
                return 1
        else:
            return 1
def syn_fragmentation_attack ( pkt ) : if ( pkt . haslayer ( scapy . IP ) and pkt . haslayer ( scapy . TCP ) ) : tcp_flag = pkt [ scapy . TCP ] . flags if tcp_flag == "S" : flags = str ( pkt [ scapy . IP ] . flags ) frag = int ( pkt [ scapy . IP ] . frag ) if ( flags == "MF" or frag > 0 ) : return 0 else : return 1 else : return 1 else : return 1