def _set_tcp_md5sig_linux(s, addr, key):
    # struct tcp_md5sig {
    #     struct sockaddr_storage addr;
    #     u16 pad1;
    #     u16 keylen;
    #     u32 pad2;
    #     u8 key[80];
    # }
    TCP_MD5SIG = 14
    af = s.family
    if af == socket.AF_INET:
        sa = sockaddr.sa_in4(addr)
    elif af == socket.AF_INET6:
        sa = sockaddr.sa_in6(addr)
    else:
        raise ValueError((af,) % "unsupported af %s")
    ss = sockaddr.sa_to_ss(sa)
    tcp_md5sig = ss + struct.pack("2xH4x80s", len(key), key)
    s.setsockopt(socket.IPPROTO_TCP, TCP_MD5SIG, tcp_md5sig)
dataset/ETHPy150Open osrg/ryu/ryu/lib/sockopt.py/_set_tcp_md5sig_linux/swapped operands of `%`