Skip to content

Commit

Permalink
bpf: dt_inet_ntoa() should return the length of its result
Browse files Browse the repository at this point in the history
The implementation of inet_ntoa6() and inet_ntop() is greatly helped if
dt_inet_ntoa() returns the number of characters in its result.  Thid
change is not visible to users.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
kvanhees committed Jul 13, 2023
1 parent f8bad1e commit e3529a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bpf/inet_ntoa.S
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ dt_inet_ntoa_write_uint8:
#undef PTR

/*
* void dt_inet_ntoa(uint8_t *src, char *dst) {
* uint64_t dt_inet_ntoa(uint8_t *src, char *dst) {
* uint64_t off, inp, len;
*
* bpf_probe_read(fp + -4, 4, src);
Expand Down Expand Up @@ -142,6 +142,8 @@ dt_inet_ntoa_write_uint8:
*
* done:
* dst[off] = '\0';
*
* return off;
* }
*
*/
Expand Down

0 comments on commit e3529a5

Please sign in to comment.