This would be a small optimization, but how about returning the label length from smack_is_label_valid() to avoid second call to strnlen()?
By the way, this strnlen() could be safely simplified to strlen(), because we already know that label length is good.