Skip to content

syscall: AF_INET/SOCK_PACKET interface doesn't work on Linux #7653

@gopherbot

Description

@gopherbot

by xiezhenye:

The "from" return value of syscall.Recvfrom on a raw socket should not be
SockaddrUnix

What steps reproduce the problem?
sock, _ =  syscall.Socket(syscall.AF_INET, syscall.SOCK_PACKET,
int(htons(syscall.ETH_P_ARP)))
_, from, err := syscall.Recvfrom(sock, buf, 0)

The type of from is SockaddrUnix so that the "from" returned can not used to
syscall.Sendto

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions