teamd: fix ctx->hwaddr value assignment

We should use memcpy to copy the data to ctx->hwaddr.
Use ctx->hwaddr = hwaddr will change the ctx->hwaddr to
a wrong address and cause the team hwaddr unable to be updated.

Reported-by: Li Liang <>
Suggested-by: Xin Long <>
Fixes: 9ca6bf9 ("teamd: update ctx->hwaddr after setting team dev to new hwaddr")
Signed-off-by: Hangbin Liu <>
Signed-off-by: Jiri Pirko <>
1 file changed